X hits on this document





47 / 67


CurrentUICulture preferences, the user will not be able to use supplemental cus- tom cultures. Similarly, other tools that are not based on the .NET Framework 2.0 will not recognize the custom cultures, so, for example, it might not be possible to use some third-party translation tools.

ASP.NET applications can use custom cultures without any modifications. If the user sets their language preferences in the browser to a custom culture and the Cul- ture and UICulture tags are set to Auto, the custom culture will be used automat- ically. In addition, you can easily localize the ASP.NET 2 Web Site Administration Tool for your custom culture by creating new resx files in the Web Site Administra- tion Tool folder. See Chapter 5, “ASP.NET Specifics,” for more details.

Supplemental Custom Cultures

A supplemental culture is a culture that is new to the .NET Framework and the oper- ating system. A number of examples of supplemental custom cultures are presented in this chapter. We start with the greatest challenge: to create a supplemental cus- tom culture from scratch without any existing CultureInfo or RegionInfo to draw from. For this example, we create a culture for Bengali (also called Bangla) in Bangladesh. The second example, which creates a supplemental custom culture from scratch, is a pseudo translation custom culture.

Bengali (Bangladesh) Custom Culture

At the time of writing, the Bengali (Bangladesh) culture, which we label as ”bn- BD”, is not known to the .NET Framework or any version of Windows. Windows Vista, however, includes the culture-neutral Bengali culture, but this is available only in Windows Vista and is not a specific culture. However, as has already been men- tioned, it is entirely possible that this situation won’t last and the “bn-BD” culture will arrive in some version of Windows in the future. Despite this, these future events do not invalidate this example. Consider that at such a time you will have a choice between forcing all of your users to upgrade to the new version of Windows (not necessarily possible) and using a custom culture that will work on all versions of Windows. The latter choice is the more practical choice. The same caveats regard- ing your culture-naming convention apply in this scenario, so although you might


Document info
Document views132
Page views132
Page last viewedFri Oct 28 22:07:36 UTC 2016