+2004-02-24 Bruno Haible <bruno@clisp.org>
+
+ * hello-csharp*/hello.cs (Hello.Main): Remove workaround for mono bug,
+ fixed in mono-0.30.1.
+
2004-02-24 Bruno Haible <bruno@clisp.org>
* hello-csharp*/autogen.sh: Copy also the csharp.m4 file.
}
public static void Main () {
- #if __MonoCS__
- // Some systems don't set CurrentCulture and CurrentUICulture as specified
- // by LC_ALL. So set it by hand.
- String locale = System.Environment.GetEnvironmentVariable("LC_ALL");
- if (locale == null || locale == "")
- locale = System.Environment.GetEnvironmentVariable("LANG");
- if (!(locale == null || locale == "")) {
- if (locale.IndexOf('.') >= 0)
- locale = locale.Substring(0,locale.IndexOf('.'));
- System.Threading.Thread.CurrentThread.CurrentCulture =
- System.Threading.Thread.CurrentThread.CurrentUICulture =
- new System.Globalization.CultureInfo(locale.Replace('_','-'));
- }
- #endif
Application.Run(new HelloWindow());
}
}
public class Hello {
public static void Main (String[] args) {
- #if __MonoCS__
- // Some systems don't set CurrentCulture and CurrentUICulture as specified
- // by LC_ALL. So set it by hand.
- String locale = System.Environment.GetEnvironmentVariable("LC_ALL");
- if (locale == null || locale == "")
- locale = System.Environment.GetEnvironmentVariable("LANG");
- if (!(locale == null || locale == "")) {
- if (locale.IndexOf('.') >= 0)
- locale = locale.Substring(0,locale.IndexOf('.'));
- System.Threading.Thread.CurrentThread.CurrentCulture =
- System.Threading.Thread.CurrentThread.CurrentUICulture =
- new System.Globalization.CultureInfo(locale.Replace('_','-'));
- }
- #endif
GettextResourceManager catalog =
new GettextResourceManager("hello-csharp");
Console.WriteLine(catalog.GetString("Hello, world!"));