X hits on this document

192 views

0 shares

0 downloads

0 comments

44 / 67

20

.NET INTERNATIONALIZATION

new culture French (France); similarly, German returns German (Germany). This is of interest to custom culture developers because this behavior cannot be specified. How important this is probably depends upon whether you create a replacement custom culture or a supplemental custom culture. If you create a replacement custom culture for “en”, you will not be able to change the specific culture from “en-US” to, say, “en-GB”. This could have been quite a useful course of action. Consider that you are creating a Web site for Nottingham Forest Football Club in the U.K. If your users’ browser language settings are “en”, then it is unhelpful for you to use Culture- Info.CreateSpecificCulture because it will return a culture for “en-US”, which will be wrong for nearly all of your visitors (for whom “en-GB” would have been more appropriate). The same is true for the Toronto Maple Leafs Web site (in Canada), where CreateSpecificCulture would return French (France) from French instead of the more useful French (Canada).

Invariant Culture

en English

en-GB English (United Kingdom)

en-GB-Acme English (United Kingdom) Acme

en-GB-Acme-Child English (United Kingdom) Acme Child

en-GB-Acme-GrandC English (United Kingdom) Acme Grandchild

Figure 11.2

Hierarchy of custom cultures when the Parent is explicitly set

Similarly, if you create a supplemental custom culture for, say, Bengali (“bn”), you have no means of specifying what the specific culture should be (e.g., “Bengali (Bangladesh)”).

Document info
Document views192
Page views192
Page last viewedSat Dec 10 20:48:34 UTC 2016
Pages67
Paragraphs859
Words13458

Comments