GUI localization on the windows platform
Hello guys. I have used this library in the c # application. And trying to change the locale. I have working code for windows platform Ui default language. But when i tries to change locale by setlocale. I haven't any change. Otherwise gtk have used default ui platform language. And i can't find out how i can change it. This is my c# example.
[DllImport("libgtk-3-0.dll", CallingConvention = CallingConvention.Cdecl, SetLastError = true)]
private static extern void gtk_disable_setlocale();
public const string x64binary = "libintl-8.dll";
[DllImport(Config.x64binary, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr bindtextdomain(string domainname, string dirname);
[DllImport(Config.x64binary, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr textdomain(string domainname);
[DllImport(Config.x64binary, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr gettext(string message);
[DllImport(Config.x64binary, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr dgettext(string domain, string message);
[DllImport(Config.x64binary, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr bind_textdomain_codeset(string domainname, string codeset);
[DllImport(Config.x64binary, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr libintl_setlocale(int type, string lang);
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl, SetLastError = true, EntryPoint ="setlocale")]
private static extern IntPtr win_setlocale(int type, string locale);
void main() {
gtk_disable_setlocale();
setlocale(0, "ENU"); // returns English_United States.1252
win_setlocale(0, "ENU"); // returns Englis_United States.1252
bindtextdomain("domain", "path");
bind_textdomain_codeset("domain", "UTF-8");
gtk_init();
}