[Gambas-user] Project language is always en_US
Martin
mbelmonte at belmotek.net
Sat Oct 8 19:41:46 CEST 2022
El 7/10/22 a las 17:39, Martin escribió:
> const char *LOCAL_get_lang(void)
> {
> char *lang;
>
> if (!_lang)
> {
> lang = getenv("LC_ALL");
> if (!lang)
> lang = getenv("LANG");
> if (!lang || !*lang)
> lang = "en_US";
> _lang = STRING_new_zero(lang);
> }
>
> return _lang;
> }
I think this code may not work correctly, for example in my system:
LANG=es_ES.utf8
LC_NAME=es_ES.UTF-8
LC_ALL=
But the code returns en_US.utf8. Is this correct?
Either the function does not return the value correctly or this function
is not used to provide the default language.
Regards.
Martin
More information about the User
mailing list