June 9th, 2004

What are these directories called 0409 and 1033?

A reader asked,

I was wondering why it’s common for some Microsoft products to have a directory called “1033” within it’s program directory installation location? What does it mean?

This reader was probably from the United States, because 1033 is the locale identifier for “English (United States)”, whose hexadecimal value is 0x0409. You may also find directories called “0409”. Some programs use hex codes and some use decimal. Go figure. Here is a list of a whole bunch of locales and their identification numbers, both in decimal and hexadecimal. Now you too can become an expert in locale identifiers. The value of a locale identifier is given by the formula primary language + 1024 * sub-language For example, Swiss German is LANG_GERMAN + 1024 * SUBLANG_GERMAN_SWISS = 7 + 1024 * 2 = 2055. So why would a program create a directory named after a language code? Many Microsoft products support a multilingual user interface. This means that the same program can be used to display its user interface in multiple languages. Office and Windows are the two biggest examples. Language-specific resources need to be broken out into their own directories so they won’t conflict with resources corresponding to some other language.

(For fun, I installed the Swedish language pack on my computer at work, so all strings – including the error messages – are in Swedish.)

Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.