[gtk] Enable locales early

Based on a Debian's patch
pull/3/head
Hleb Valoshka 2019-07-19 23:13:20 +03:00
parent f0c568dbf3
commit 8cf30873fd
1 changed files with 10 additions and 10 deletions

View File

@ -279,6 +279,16 @@ static void initRealize(GtkWidget* widget, AppData* app)
/* MAIN */
int main(int argc, char* argv[])
{
/* Force number displays into C locale. */
setlocale(LC_NUMERIC, "C");
setlocale(LC_ALL, "");
#ifndef WIN32
bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);
#endif /* WIN32 */
/* Initialize the structure that holds the application's vitals. */
AppData* app = g_new0(AppData, 1);
@ -339,16 +349,6 @@ int main(int argc, char* argv[])
SetDebugVerbosity(0);
/* Force number displays into C locale. */
setlocale(LC_NUMERIC, "C");
setlocale(LC_ALL, "");
#ifndef WIN32
bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);
#endif /* WIN32 */
app->core = new CelestiaCore();
if (app->core == NULL)
{