Issue 114155 - configmgr: fall back to "en" locale
Summary: configmgr: fall back to "en" locale
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: 3.4.0
QA Contact: issues@framework
Depends on:
Reported: 2010-08-27 16:36 UTC by Stephan Bergmann
Modified: 2011-01-24 09:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2010-08-27 16:36:22 UTC
The comments in issue 114078, and
cutting occurrences of xml:lang="en-US" to xml:lang="en", made me think that it
would be better if the code at
would also try "en" as a fallback when the first fallback of "en-US" was
unsuccessful.  That way, in the above Addons.xcu example, unavailable locales
would fall back to "en" instead of the first item within the configmgr
implementation, which typically is not the textually first one in the .xcu file,
but rather the lexicographically smallest one, like "be".
Comment 1 Stephan Bergmann 2010-08-27 16:41:28 UTC
Comment 2 fyva 2010-08-28 09:03:42 UTC
sb, what will be the default language if no en-US, en, en-ZA, en-GB provided? If
for example, xcu provides 3 languages (fr, es, de), how to make fr to be default?
Comment 3 fyva 2010-08-28 10:06:55 UTC
IMHO, the textually first in xcu should be default. In
"en" is textually first and would be default language. Then it will not be
needed to check en-US or en and the algorithm will be fast.
Comment 4 fyva 2010-08-28 10:28:25 UTC
There also can be values with no xml:lang="zz", just <value>xxx</value>. Does it
mean that that value would be default? Maybe then it is sufficient to remove
xml:lang="zz" for languages that are supposed to be default?
Comment 5 Stephan Bergmann 2010-08-30 08:11:57 UTC
"defaults are the empty string locale, the 'en-US' locale, the first child (if
any), or a nil value (even though it may be illegal for the given property), in
that order", where "empty string locale" means a <value> without xml:lang
attribute, and "the first child" effectively means picking a random element.
Comment 6 Stephan Bergmann 2010-09-23 15:19:23 UTC
fixed as <>
Comment 7 Stephan Bergmann 2010-11-02 10:28:13 UTC
@tbo: please verify (for testing, see reference to Addons.xcu above)
Comment 8 2010-11-08 12:09:24 UTC
It works now as described from sb Mon Aug 30 07:11:57 +0000 2010 
added is now, if no 'en-US' is available, the next candidate is tried: 'en', and
then the list as described by sb.
Comment 9 2011-01-24 09:47:31 UTC
integrated into master DEV300m93 - closing