Doing the minimum isn't always the best plan...

by Michael S. Kaplan, published on 2010/09/10 07:01 -04:00, original URI:

The question might seem familiar to some:

Our app could be deployed on Windows XP/2003 which doesn’t support en-SG (English-Singapore) and en-MY (English Malaysia), two cultures that we are shipping.

We are setting the CurrentUICulture explicitly and deploying the appropriate satellite assemblies. My question is: will this just work on XP/2003 or would we have to register custom cultures on these operating systems?

Seem familiar?

Well, as I suggested in this blog, this other blog, and thisthird blog, there is really no choice in the matter -- if you want to use a culture to a machine that does not have it, you have no choice but to install a custom culture on the box (ideally it is mostly or completely based on the culture that one is trying to synthetically emulate).

\A follow-up question someone else asked me, offline, was whether they really had to base the custom culture on the actual one, since that could potentially be more difficult to do.

Now in practice for most people (including the one asking the question here), the requirement is just fro resource loading.

This can make it tempting to not work very hard to fill in the complete culture accurately.

Though since any other applications running on the machine will also find this culture, it really makes the most sense to do as much as you can to do a quality job.

You're not just working for yourself here; you're working for the whole machine and any managed code running on it (in the case of Vista and later these cultures will be available as locales in native code as well). Doing the job halfway definitely isn't good enough....

ErikF on 13 Sep 2010 6:18 AM:

Fortunately I've never had to do this for any of my programs, but wouldn't this fit under the category of a supplemental custom culture?  A site that came up when I searched about this ( suggests using either GUIDs after the language name or the private "x-" namespace.  From what I can tell in the e-mail that you received, this would work fine because the culture is being set explicitly (I'm not sure how well it would work if the culture was being set automagically!)

Michael S. Kaplan on 13 Sep 2010 12:51 PM:

If you load up a built-in culture on a machine as your source then it is a Windows-only culture there, but when you install it on a machine where it is not loaded it essentially becomes a regular custom culture....

No x- names needed to handle the general case here, which is just to support a particular culture.

go to newer or older post, or back to index or month or day