diff --git a/changelog.txt b/changelog.txt index 2afe599a..aac5d735 100644 --- a/changelog.txt +++ b/changelog.txt @@ -214,6 +214,4 @@ CubeScript I18n / L10n --------------------- -[*] Client now tries to set the LANG alias if it's not defined. -[*] fixed LANG for windows (breaks Win98/2K compatibility!) [*] Float separator set to "." (dot) regardless of locale. diff --git a/source/src/i18n.cpp b/source/src/i18n.cpp index 357fa774..f5d3ad18 100644 --- a/source/src/i18n.cpp +++ b/source/src/i18n.cpp @@ -3,7 +3,7 @@ #include "cube.h" #include -SVARP(lang, ""); +SVARFP(lang, "en", filterlang(lang, lang)); i18nmanager::i18nmanager(const char *domain, const char *basepath) : domain(domain), basepath(basepath) { @@ -12,20 +12,6 @@ i18nmanager::i18nmanager(const char *domain, const char *basepath) : domain(doma textdomain(domain); bind_textdomain_codeset(domain, "UTF-8"); // we use the utf-8 charset only - - char localelang[3]; - if(!lang[0]) - { -#ifdef WIN32 - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME, localelang, 3); -#else - copystring(localelang, locale, 3); -#endif - filterlang(localelang, localelang); - copystring(lang, localelang, 3); - } - printf("current locale: %s (%s)\n", locale, lang); - setlocale(LC_NUMERIC, "C"); // make sure numeric is consistent (very important for float usage in scripts) // Note to self: only do this _after_ using the return value from the previous // setlocale call - this one will overwrite it