[Gambas-user] Project language is always en_US

Jussi Lahtinen jussi.lahtinen at gmail.com
Fri Oct 7 19:48:37 CEST 2022


Your suggestion doesn't change anything (except it skips checking LC_ALL).
The current code checks first LC_ALL and if it is empty it already checks
LANG after that.
en_US is used only if both are empty.


Jussi


On Fri, Oct 7, 2022 at 6:40 PM Martin <mbelmonte at belmotek.net> wrote:

> El 7/10/22 a las 11:39, bb escribió:
> > I had to resort to setting
> > all the LC variables known on this planet (and others) to make it aware
> > that I was in AU and NOT USA!
>
> what is G*dAwf&l?
>
> Are you talking about having to change the Linux desktop configuration?
> If so, which one exactly?
> You know you can use the locale command right?
>
> in the gambas code, searching with grep where the word en_US exists I
> found that the file gbx_local.c has a function that searches in the
> local configuration for the system language but as it does not find it,
> it puts en_US.
>
> In my case that I use a GTK desktop (Manjaro XFCE) the locale command
> does not return parameter in the ALL= key (which is what gbx_local.c
> looks for).
> Maybe changing a little bit this C function can correct the issue.
>
> const char *LOCAL_get_lang(void)
> {
>         char *lang;
>
>         if (!_lang)
>         {
>                 lang = getenv("LC_ALL"); */Here maybe use lang =
> getenv("LANG")/*
>                 if (!lang)
>                         lang = getenv("LANG");
>                 if (!lang || !*lang)
>                         lang = "en_US";
>                 _lang = STRING_new_zero(lang);
>         }
>
>         return _lang;
> }
>
> This is my system locale configuration
> LANG=es_ES.utf8
> LC_CTYPE="es_ES.utf8"
> LC_NUMERIC=es_ES.UTF-8
> LC_TIME=es_ES.UTF-8
> LC_COLLATE="es_ES.utf8"
> LC_MONETARY=es_ES.UTF-8
> LC_MESSAGES="es_ES.utf8"
> LC_PAPER=es_ES.UTF-8
> LC_NAME=es_ES.UTF-8
> LC_ADDRESS=es_ES.UTF-8
> LC_TELEPHONE=es_ES.UTF-8
> LC_MEASUREMENT=es_ES.UTF-8
> LC_IDENTIFICATION=es_ES.UTF-8
> LC_ALL=
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221007/d8cc0f27/attachment.htm>


More information about the User mailing list