Freigeben über


Custom Locale and Custom Culture Limitations and Things That Work.

Some people have used custom locales/custom cultures successfully and others are finding scenarios that don't work.  Feel free to comment about what scenarios work/don't work for you.  I'll try to update this when I learn about new scenarios.

Limitations:

  • Windows XP/Server 2003 and below don't understand custom locales in native (unmanaged) code.
  • Microsoft .Net v1.0/v1.1 don't understand custom locales on any OS.
  • Office doesn't natively understand custom locales.  This can lead to some odd behavior
    • LCIDs embedded in documents will all be 0x0c00.  Since 0x0c00 isn't installed on all machines, and is likely different on other machines this will probably have some odd behavior.
    • Similarly Office isn't expecting LCID 0x0c00, so language specific tools like the spell checker may not work.
  • Applications that depend on LCIDs may not work as expected.  Many work with the 0x0c00 LCID, however that may not be present or may differ on different machines.
  • Custom locales/cultures may have unusual values that might confuse logic that expected more traditional values.  For example, a locale I have uses "tera' HH:mm:ss" for its time format.  Applications that then try to parse this format sometimes get confused by the extra constant "tera'" string.
  • Applications sometimes rely on a hard coded enumeration of locales or locale data.  These types of applications are more likely to have problems with custom data.
  • ASP.Net applications work with custom cultures, however some users may not be allowed to install custom cultures on their web server.  In particular, users hosted by an ISP that hosts several domains on a virtual server are likely to run into problems.  A workaround is that if a custom culture is created according to standards with reasonable data and a standard name, and ISP may choose to install that culture(s).  Those custom cultures would then be available to all users of the machine.

Things that work:

  • Custom cultures behave like other cultures in .Net Framework v2 apps, and many applications that don't depend on LCIDs work as expected.
  • Custom locales work fine as LOCALE_USER_DEFAULT in Windows Vista applications.  Many applications work as well as with custom locales as built-in locales.  The ones that don't are usually making data assumptions that aren't always true.
  • ASP.Net applications can use custom cultures, however they must be installed on the host server and are available for all users.

Please let me know of any other cases that you run into, or any workarounds you find.  We're working on some of the known limitations, but some of the issues are complex and will take some time until a full solution is available.

- Shawn

Comments

  • Anonymous
    November 29, 2007
    Will custom cultures become available for shared hosting environments (without registering the culture nor have the culture be available to all other processes)? In my case I need to present different resources to students of different levels and thought the cultureinfo to be the key to succes.

  • Anonymous
    December 13, 2007
    Currently that isn't possible, the locales need to be installed per-machine.  You could make something like en-US-x-level1 if that helped.  I'm curious about the distinction between levels, can you tell me more?  I'm aware of distinctions in like Japanese where younger users may not be able to use the full character set, is your case similar to that?

  • Anonymous
    March 18, 2008
    PingBack from http://cityjokesblog.info/im-not-a-klingon-custom-locale-and-custom-culture-limitations-and/

  • Anonymous
    May 01, 2008
    How can I build a custom culture (the point is to add a calendar) and make it available via "Regional and Language" settings in control panel on Windows XP (not Windows Vista) ? Is it possible at all to extend cultures in windows xp?

  • Anonymous
    May 05, 2008
    Custom cultures aren't supported in XP, they are a Windows Vista feature :).  Microsoft.Net apps will take advantage of custom cultures in Vista, but not to that extent. Out of curiousity, which calendar to which culture?  Calendars are also tricky because they're localized to the calendar language.  (So adding a Japanese calendar to en-US would give you Japanese month names, etc.)