get rid of pathetic language detection code again
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6845 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -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.
|
||||
|
||||
+1
-15
@@ -3,7 +3,7 @@
|
||||
#include "cube.h"
|
||||
#include <locale.h>
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user