[sword-devel] swlocale question
ransom1982 at gmail.com
Fri Sep 4 01:27:08 MST 2009
> What I said wasn't quite right.
> We set a custom locale dir with LocaleMgr::loadConfigDir().
> The language format I can get from the system can be something like:
> "es_ES_PREEURO" or just the language code like "es".
> So your snipped would work here too if the former format is reduced to 5
You don't even need to do that. The code will try to match the whole
string first, then try a match at 5 characters, and then finally at 2.
So it would find a match no matter whether you had "es_ES_PREEURO" or
"es", so long as there existed a locale in SWORD that started with
> What happens if the current system language is not available in SWORD or if
> none is manually set? Then I guess english will be taken as a default.
Yes, it will be set to English.
More information about the sword-devel