[sword-devel] Locale - proposal

Peter von Kaehne refdoc at gmx.net
Fri Jan 3 08:22:20 MST 2014

Would there be any objection if I do following:

1) Many of the description lines of our locale files have the language
name in long form with an added "(Unicode)"

e.g. ru_RU-utf8 reads as follows:

Description=Russian (Unicode)

I see no good reason that the "(Unicode)" is there. Users do not need to
know this, programmers know what they are doing. I would like to delete
this bit from all relevant files, so that it only reads as follows:


2) We have a whole bunch of locales with added country codes, but
without default locale for the language. As a result doing the following
(C++) fails:

                LocaleMgr *localeMgr = new LocaleMgr();
                SWLocale *modlocale = localeMgr->getLocale("ru");

                LocaleMgr *localeMgr = new LocaleMgr();
                SWLocale *modlocale = localeMgr->getLocale("ru_RU");

will succeed. I think this is overspecific and should not be so.

Unless there is a fix possible in the engine which would result that 
localeMgr->getLocale("ru") calls "ru_RU" I think we should simplify our
locale provision so that all locales are named without country code,
unless a specific country code gives extra information. I.e here i would
copy/move the file ru_RU-utf8.conf to ru-utf8.conf and recreate a
ru_RU-utf8.conf only if we wanted to create alternatives for e.g.
ru_KAZ, ru_RU and ru_UK etc.

Any objections or suggestions to this?


More information about the sword-devel mailing list