[Gambas-user] Translate a Project

Benoit Minisini gambas at ...1...
Mon Jan 28 20:19:44 CET 2008


On lundi 28 janvier 2008, Stefano Palmeri wrote:
> Alle 18:19, lunedì 28 gennaio 2008, Nx GT-R BOY ha scritto:
> > I, have a question about a Project translation.
> >
> > I have read of course the howto guide:
> > http://www.gambasdoc.org/help/howto/translate
> >
> > But, what's next? I have my *.po in my .lang directory, so, how do I
> > change my project language, I read something about environment variables
> > (another site) must be set in a console but not sure, because the "howto"
> > don't say nothing about this variables.
> >
> > Freespire 2.0
> > Gambas 2.0
> >
> > Thanks,
>
> Example: do you want to see Gambas IDE in french?
> Type on console:
>
> LANG=fr_FR gambas2
>
> in spanish?
>
> LANG=es_ES gambas2
>
> etc...
>
> do the same for your project.
>
> Stefano
>

The actual algorithm is the following:

1) The contents of the LC_ALL environment variable is taken.

2) If LC_ALL is void, then the contents of the LANG environment variable is 
taken.

3) If LANG is void, then the language is set to "en_US".

4) The associated translation file is loaded.

5) If no associated file is found, and if the language has the "xx_YY" form, 
then the translation associated with the language "xx", without the country 
part "_YY", is loaded.

6) If no translation file can be found, then no string is translated.

Note that the translation file cannot be loaded if the associated glibc locale 
files are not installed on the system.

For example, on my french Mandriva, I have to install the "locale-es" package 
to be able to run the IDE in spanish.

Regards,

-- 
Benoit Minisini




More information about the User mailing list