Nicolas Vervelle wrote:

> Bob Hanson wrote:
>
>> Nico, I've checked in what I think will serve for country/variant 
>> localization.
>> Correct me if I'm wrong, but the way this should work is:
>>
>> 1) If the user selects "fr_CA_nb" and we don't support that, Jmol 
>> should choose "fr_CA", if we support that, or "fr" if we don't.
>> 2) If the user selects "fr_CA_nb" and we do support that, then there 
>> might be three
>>    bundles:
>>
>>    Messages_fr
>>    Messages_fr_CA
>>    Messages_fr_CA_nb
>>
>> No need to duplicate -- the only terms in fr_CA need to be ones that 
>> are not in fr, and likewise for fr_CA_nb in relation to fr_CA. Jmol 
>> would look for a term in fr, and if it is not there, then it would 
>> look in fr_CA, and only then if not there look in fr_CA_nb.
>>
>> That sound about right?
>>   
>
> Almost, but not exactly.
> You have to think in reverse order for the Messages (from fr_CA_nb to
> fr), not the other way.
>
> Basically, in "fr" you will have *all* translations (probably for
> France, since it's the base), then in fr_CA you will only have texts
> that are translated differently than "fr", ...
> GT must first search in the most specific (fr_CA_nb) and then in less
> specific (fr_CA, fr, default) until it finds a translation.
>
>
>> Currently if I do
>>
>> language = "none"
>>
>> I get the message:
>>
>> language = "en_US"
>>
>> (at least for me).
>>
>> What do you get?
>>   
>
> language = "fr" (good)
>
> Is there anything else that should be done on this ?
> Seems ok to me currently.
>
> Nico
>
The key to making that work is simply to have the order we want checked 
be the order in the array in GT.createLanguageList();. I think we're set 
until someone actually comes up with a country localization. We can 
recommend that pt_BR  be the first, perhaps. I just checked in a change 
so that the menu shows the codes and the GT._() call for the language 
does not show country.

So for you, Nico, the menu comes up in French initially, without a 
problem? If so, then, yes, I think we are done here. I feel very good 
about it. It's quite simple (Thanks to Nico!) and quite general (now 
that we can have the menu automatically catalog the available languages. 
Unless someone else finds something odd, I think we are done.

Let's get it out there so people can use it.

Bob




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to