> On Oct 16, 2017, at 5:19 AM, Guillaume Gardet <guillaume.gar...@free.fr> 
> wrote:
>>> It seems to be now "lang=de" what we need and currently we pass 
>>> "language=de_DE".
>>> Changing the "language" to "lang" is a no-brainer but how can I teach the 
>>> uiLanguage() function to return the short language string? Or shall I 
>>> simply truncate it?
>> 
>> Yes, the first two letters are the language, then you get a dash or 
>> underscore, then the country.
>> Some languages do not have the country modifier at all.
> 
> Be careful, it seems that some languages are 3 letters: nds_DE (=low german), 
>  mai (=Maithili), maybe more?

I have never seen that. I thought that all languages were supposed to be two 
letter.
We'd have to check if we do this correctly in Subsurface already... admittedly, 
we of course support neither of these languages, but we shouldn't break things, 
either.

So I guess you have to search for a '-' or '_' and grab what's in front of that.

/D

_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to