New in Vista: What's your name? Who's your daddy?

by Michael S. Kaplan, published on 2006/01/31 11:01 -05:00, original URI:

It is probable bordering on certainty that the Zombies were not singing about cultures in the .NET Framework in their song Time of the Season. Even in some kind of prophetic sense.

And while I'm sure there are parents out there who may not be keen on the resource model that the .NET Framework uses (i.e. if resources do not exist for a particular language, check what its parents have!), the resource fallback model has some important customization abilities over simple string parsing of RFC-1766 or RFE-3066 names.

But this post is not about any of that. This post is about Windows.

I mean, it is easy to claim in the .NET Framework that CultureInfo names are where it is at, and that LCIDs are just there for backwards compatibility.

But meanwhile back in Windows, the NLS API and all of its functions pivot on LCID.

Well, they used to, I mean.

Because Windows Vista supports new functions that take locale names rather than LCIDs!

For now, I'll just list a bunch of the ones that are on the MSDN site online:

And more!

And of course there is the easy moving between names and LCIDs with LCIDToLocaleName and LocaleNameToLCID.

Future posts will talk about various details of many of these new functions and the special things that some of them can do that go above and beyond their LCID-based versions.

And just so you don't think the post title was entirely gratuitous:

So now any developer running Vista can ask of a locale those immortal questions first asked by The Zombies -- What's your name? Who's your daddy?

And parents throughout the world will shudder at the precedent since those often neutral names that are the parents can be used for resource fallback, along with the new MUI functions for UI language that I will talk about another day..... :-)


This post brought to you by "𝅘𝅥" (U+1d15f, a.k.a. MUSICAL SYMBOL QUARTER NOTE)

# ChipH on 31 Jan 2006 2:23 PM:

Well, now we know what comes after the "Ex" version of an API. It's the "ExEx" version!


(I'm not complaining, but I think a lot of people saw this coming)

# Michael Dunn_ on 31 Jan 2006 6:59 PM:

In another 10 years, after two more revs of the OS, are we going to have FoobarExExExEx APIs? ;)

# Michael S. Kaplan on 31 Jan 2006 8:09 PM:

I hope not, Mike!

# mdolenga on 31 Jan 2006 10:48 PM:

Ssssshh, don't tell anyone some of the alternative names we threw around before deciding. :)

# Nathan on 1 Feb 2006 1:16 AM:

That ExEx thing is horrible, come on you guys can do better than that.

# PatriotB on 6 Feb 2006 10:13 PM:

Seriously, can you guys PLEASE not use ExEx?  It's hard to read, unprofessional, and not scalable at all.

Plus, it is inconsistent with other APIs.  For example, IE 7 is introducing a function CreateURLMonikerEx2 (  Can you please use Ex2 (EnumCalendarInfoEx2) instead?  Please say it isn't too late to make this change.  Make it now, before Vista is released, otherwise it will be too late and it will be around forever.

# Michael S. Kaplan on 6 Feb 2006 10:24 PM:

Hi PatriotB,

I'm sorry to say, but what IE7 here is not really a guideline for the Win32 API (nor is MLang for that matter). But punishing anyone who has started working to use the new functions is not really a good answer either....

# PatriotB on 7 Feb 2006 4:30 PM:

:(  Just thought I'd offer my two cents on how to make the Windows API set the best it can be.

Plus, anyone using the new functions should be under the understanding that they are "preliminary and subject to change."  You could even define the ExEx version as a macro for these users.

# Michael S. Kaplan on 7 Feb 2006 10:08 PM:

Looking at other Win32 API functions, I do not see a strong precedent of the number suffix mechanism (which seems more common in COM-based implementations). There is a wide range of possibilities (including the huge number of weird things that GDI does for the text extent functions), though....

I am having trouble seeing what precisely is so bad about the ExEx for tha few functions that already had Ex versions, though. Could you explainI am not sure I see it as particuloar hard to read or as particularly unprofessional.

I mean beyond the reminder of my ex, that is. :-)

Seriously, could you give me a little more of your thinking on this?

# laura on 3 Mar 2006 5:45 PM:

the best school ever

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2008/11/14 When features collide (aka Your LCID sucks, but sometimes the bug sucks more)

2007/03/19 A way better model for features, part 2

2006/10/15 Not everything you might want out of a GetDateFormatEx, but think of it as a fixer-upper

2006/07/16 Nobody likes change

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