[sword-devel] Locale - proposal
Peter von Kaehne
refdoc at gmx.net
Fri Jan 3 09:37:22 MST 2014
> On Fri, 2014-01-03 at 10:54 -0500, DM Smith wrote:
> BTW, I like how Java searches for localized resource files. The actual
> implementation is rather complex (because it searches multiple
> locations), but to simplify:
> Given a language code, a country code and a script code (script is new
> to Java 7), it looks for the most specific first (i.e. using all
> three) and then looks for a bit less specific (i.e. lang/country and
> lang/script) and then for least specific (i.e. lang). Failing that it
> returns the application default, which does not specify any language,
> country or script.
>
The C++ sword engine does not do the search for parents as you explain
for Java.
E.g. there is a locale de. Searching for de_DE should bring up de in
absence of de_DE, but this does not happen. I have checked that.
But even if we make the engine's search more intelligent (to search for
"parent" if the "offspring" search has failed), we still need to create
duplicate locales for some of the situations where we have no "parent"
locale, just "offspring" -e.g. in Russian and Arabic. Chinese is
complicated and I do not know what the right solution is. Maybe in some
places failure is the right answer.
Peter
More information about the sword-devel
mailing list