[Gambas-user] Langage module in gambas IDE

Benoit Minisini gambas at ...1...
Thu Mar 25 22:43:55 CET 2004


On Thursday 25 March 2004 20:16, ron wrote:
> I did some more research on this subject.
> There seams to be more ways to interpret this 'xx_YY' stuff.
> ==============
> The first  way is:
> ----------------------
> The 'language' spoken in 'COUNTRY'
> Example:
>   'fr_BE', en_BE'. 'nl_BE' and 'de_BE' as output from the locale program.
>
> I understand here the French 'fr' people do not speek Belgium 'BE' language
> but 'french' is spoken by 'BELGIAN'.
> The language module in gambas has the same meaning I belive.
> i18n method is the same with the packs as i18n_fr or i18n_de
>
> This way is used in the paths for KDE HelpCenter also.
> There is however a mistake in Helpcenter to use the COUNTRY for the
> help pages and LANG for the GUI. Confirmed in KDE's Bugzilla list.
>
> In KDE Region/Languages the add list is empty and I can add only
>  'English (US) but it is not done', Country is set to Netherlands NL)
> In KDE System/Admin Date & Time Current Zone 'Europe/Amsterdam'
> In Yast Choosen language say 'English (US)' and for time zone
> 'Europe/Amsterdam'
>
> ATM my COUNTRY is NL and LANGUAGE is ENGLISH spoken in (US).
>
> the locale program say's RC_LANG=en_GB and LC_CTYPE=en_GB ????
> HelpCenter say's sometimes file xxx in '/opt/kde/share/doc/HTML/en_US/' not
> found. Sometimes for /en_GB too.
> There is a symlink for /en_US and /en_GB to /en and here the file itself
> and not the directory must be the reason. All docs are in the /en
> directory.
>
> For Gambas in the IDE the language is from System.Language.
> When I put it on startup in a textbox it say  'en_US'.
>
> When I start the Translation addin the Language shows me initial Dutch 'NL'
> so I asume here you use the COUNTRY part of, and thats the problem, what?
> The class uses the System.Language or .Profile, both say 'en_US'
>
> in the FTranlation:
>  sLang = Project.Config.ReadString("/Language", System.Language)
>   iIndex = cmbLang.Find(Language.ToName(sLang))
>   IF iIndex < 0 THEN iIndex = cmbLang.Find(Language.ToName("fr"))
>   cmbLang.Index = cmbLang.Find(Language.ToName(sLang))
>
> Found in the .project file Language=en_US, Localize=1
> For Gambas my System Language is 'en_US'
>
> Before the snip I read the System.Language direct and it say's 'en_US'
> The Project.Config.Read line returns 'nl'
> This tested with a new fresh project.
> Where is 'nl' comming from ???

System.Language returns the language_COUNTRY value stored in $LANG.

The interpreter uses it to find a translation file that matches it exactly. If 
the translation file does not exist, it tries another with only the language 
part.

Then, 'nl' is the dutch translation used when no other country-specific dutch 
translation exists. It is "common dutch". 'nl_NL' will means the dutch spoken 
in netherlands. This is purely a Gambas agreement.

The COUNTRY part is just used to provide more specific translation.

For example, 'fr' is french (french is french), but 'fr_CA' is the french 
spoken in Canada, which is very different from oiginal french !

>
> ===================
> The second is:
> --------------------
> The 'language' and 'COUNTRY'  !! Yes I write AND !!!
>
> This is SuSE's setting with Yast on install anyway.
> Chose for Language English (USA) or English (British) and
> all the money, number and date settings change for the country.
> They change COUNTRY and not the language with it.!!!!
> There is no COUNTRY setting in Yast or it must be TimeZone.
>
> I tried to setup my SuSE system on Tenerife. :(
> The remaining is a whole story on his own but I can say NO SUSE on Tenerife
> or if the country, language and timezone, date and money does not fit on
> the spot you are using, working and installing forget the SuSE distro.
>
> Every distro's have there own way and this one
> -----8<-----
> I will try not discuss it anymore.
> ----->8-----

This is a problem with SuSE. I think they are wrong. Country and language must 
be distinct...

>
> ===================
> The third way
> ----------------
> How any user will do it on his/here own way
> The front 'en' as COUNTRY and the last 'US' as language.
>
>
> There is somewhere a real definition of RC_LANG may be it is the first one
> but my feeling of LANG in RC_LANG is the first one as
>   "language  _spoken_in_  COUNTRY."
>
>
> For the rest:
> Where is 'nl' comming from ???
> May be a System.Country can be nice to have. For a Dialer program i.e.
>
> Ron
>

Actually, System.Language returns the COUNTRY and the language, specific to 
this country, or just the language, and then assume that the COUNTRY is the 
same.

I think I won't change anything until something standard arise between 
distributions - But I think the way of Mandrake (the same as Fedora) is the 
right way, and that SuSE may be the only distribution that proceeds this way. 
Something to check...

What do Gentoo, Slackware, FreeBSD, ... user think about that ? How are the 
country and the language specified on their system ?

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list