the problem is not the second setlocale, but rather where I put it
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6672 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+4
-8
@@ -6,13 +6,6 @@
|
||||
i18nmanager::i18nmanager(const char *domain, const char *basepath) : domain(domain), basepath(basepath)
|
||||
{
|
||||
locale = setlocale(LC_ALL, ""); // use current default locale
|
||||
// C forbids multiple locales, sireus - the line you put it messed up the locale var completely - flowtron got this output:
|
||||
// current locale: packages/locale (pa)
|
||||
// see this mail: http://www.sourceware.org/ml/binutils/2000-06/msg00024.html
|
||||
// I noticed that problem with e.g. zoom-factor - my workaround was to put it into a division-call, instead of as a constant; works regardless of seperator
|
||||
// but this won't necessarily work in all cases, the mail I linked talks about implementing replacement functions that mimick the C-locale.
|
||||
// so .. this gets marked: FIXME
|
||||
//setlocale(LC_NUMERIC, "C"); // make sure numeric is consistent (very important for float usage in scripts)
|
||||
bindtextdomain(domain, basepath); // set base path
|
||||
textdomain(domain);
|
||||
bind_textdomain_codeset(domain, "UTF-8"); // we use the utf-8 charset only
|
||||
@@ -25,8 +18,11 @@ i18nmanager::i18nmanager(const char *domain, const char *basepath) : domain(doma
|
||||
#endif
|
||||
filterlang(lang, lang);
|
||||
alias("LANG", lang);
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// export gettext to cubescript
|
||||
|
||||
Reference in New Issue
Block a user