one macro language, two default languages
Philippe Verdy via CLDR-Users
cldr-users at unicode.org
Fri Mar 23 08:14:37 CDT 2018
If you can distinguish a region in addition to the language, the fallbacks
chain can be customized, but this requires mapping not just one fallback
language (and infering the others from it), but setting up **locale**
fallbacks chains so that you'll map a locale to an list of locales,
**ordered** by preference. and using these chains **before** looking for
generic fallbacks.
E.g. Given these two tuned mappings:
{
"nds-nl" : ["nl"],
"nds": ["de"],
}
Here if a resource is not found in "nds-nl", it will be searched first in
"nl", then "nl" **before** searching in "nds" from implied BCP47 fallbacks,
then "de" by closure of the first mapping.
This can be used to tune the behavior of fallbacks from "man", but only if
you can distinguish two distinct usages for regions. So you'll get these
mappings:
{
"man": ["mnk"],
"man-XY": "emk", //replace "man-XY" by the relevant distinctive region or
variant.
"mnk": ["emk"],
"emk": ["mnk"],
}
This solves all practical problems, but in all cases you'll have to choose
if the first line above should be:
"man": ["mnk"],
or
"man": ["emk"],
Here you need an arbitrary choice, or choice based on frequency of usage,
or on the level of coverage with localized data you have the best between
"mnk" and "emk". This initial arbitrary choice can be tuned at any time
later in your project.
Note that without the last two rules:
"mnk": ["emk"],
"emk": ["mnk"],
you'd need to specify the first rule either as:
"man" -> ["mnk", "emk"],
or:
"man" -> ["emk", "mnk"],
with the same kind of arbitrary or motivated choice.
For this reason, such arbitray mapping cannot/should not be done in generic
CLDR data which, can ONLY specify the last two rules, which do not take any
decision, that each application developer/maintainer will have to take
themselves:
{
"mnk" -> ["emk"],
"emk" -> ["mnk"],
}
But generic CLDR data can also contain this additional mapping where it is
distinctive enough:
"man-XY" -> "emk", //replace "man-XY" by the relevant distinctive region
or variant
without deciding anything about the ordered mapping of fallbacks from "man".
Philippe.
2018-03-23 7:48 GMT+01:00 Martin Hosken via CLDR-Users <
cldr-users at unicode.org>:
> Dear All,
>
> I notice that both mnk and emk have language aliases to man. I can
> understanding picking one language as the concrete equivalent of a macro
> language, but two?
>
> The algorithm is one way and so there is nothing to stop this happening.
> But when it comes to actual locale data, which locale should end up in
> man.xml?
>
> TIA,
> GB,
> Martin
> _______________________________________________
> CLDR-Users mailing list
> CLDR-Users at unicode.org
> http://unicode.org/mailman/listinfo/cldr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://unicode.org/pipermail/cldr-users/attachments/20180323/033bdc70/attachment.html>
More information about the CLDR-Users
mailing list