{"id":10193,"date":"2011-07-11T07:00:00","date_gmt":"2011-07-11T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2011\/07\/11\/windows-has-supported-multiple-ui-languages-for-over-a-decade-but-nobody-knew-it\/"},"modified":"2011-07-11T07:00:00","modified_gmt":"2011-07-11T07:00:00","slug":"windows-has-supported-multiple-ui-languages-for-over-a-decade-but-nobody-knew-it","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20110711-00\/?p=10193","title":{"rendered":"Windows has supported multiple UI languages for over a decade, but nobody knew it"},"content":{"rendered":"<p>In the early days of Windows, there was a separate version of Windows for each language, and once you decided to install, say, the French version of Windows, you were locked into using French. You couldn&#8217;t change your mind and, say, <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2006\/04\/24\/582153.aspx\"> switch to German<\/a>. The reason for this is that there were bits and pieces of language-dependent information stored all over the system.\n One obvious place is in file names. For example, a shortcut to the calculator program was kept at <tt>%USERPROFILE%\\<u>Start Menu\\Programs\\Accessories\\Calculator.lnk<\/u><\/tt> on US-English systems, but <tt>%USERPROFILE%\\<u>Startmen&uuml;\\Programme\\Zubeh&ouml;r\\Rechner.lnk<\/u><\/tt> on German systems. The name of the physical file system directory or file was displayed to the user as the name of the menu item. This means that if you started with an English system and simply replaced all the user interface resources with the corresponding German ones, you would still see a folder named <i>Accessories<\/i> on your Start menu, containing a shortcut named <i>Calculator<\/i>, even though they should now be displayed as <i>Zubeh&ouml;r<\/i> and <i>Rechner<\/i>.\n The registry was another place where language-dependent strings were stored. For example, file type descriptions were stored in plain text, which meant that if you installed an English system, then <code>HKEY_CLASSES_ROOT\\txtfile<\/code> had the value <tt>Text Document<\/tt>, and that&#8217;s the value shown to the user under the <i>Typ<\/i> column even though the user had switched the user interface resources to German.\n For Windows&nbsp;2000, an effort was made to move all language-dependent content into resources so that they could be changed dynamically. If you need to store a language-dependent string anywhere, you can&#8217;t store the string in plain text, because that would not survive a change in language. You have to store an <a href=\"http:\/\/msdn.microsoft.com\/bb759919.aspx\"> indirect string<\/a> and convert the indirect string to a real string at runtime, so that it mapped through the user&#8217;s current user interface language. It was quite an effort identifying all the places that needed to be changed to conform to the new rules while still ensuring that the new rules were backward compatible with old code that followed the old rules.\n For example, you couldn&#8217;t just say &#8220;To register a language-aware file type friendly name, write an indirect string to <code>HKEY_CLASSES_ROOT\\progid<\/code>. For example, set <code>HKEY_CLASSES_ROOT\\txtfile<\/code> to <code>REG_SZ:@C:\\Windows\\system32\\notepad.exe,-469<\/code>.&#8221; If you did that, then applications which retrieved file type friendly names by reading directly from <code>HKEY_CLASSES_ROOT\\progid<\/code> (instead of using functions like <code>SHGet&shy;File&shy;Info<\/code>) would end up showing this to the user:<\/p>\n<table style=\"background: white;color: black;border: black;border-collapse: collapse\">\n<tr>\n<td style=\"border: solid black .75pt\">Name<\/td>\n<td style=\"border: solid black .75pt\">Type<\/td>\n<td style=\"border: solid black .75pt\">Modified<\/td>\n<\/tr>\n<tr>\n<td>House pictures<\/td>\n<td>@C:\\Windows\\system32\\zipfldr.dll,-10195<\/td>\n<td>11\/16\/1998 4:09 PM<\/td>\n<\/tr>\n<tr>\n<td>notes<\/td>\n<td>@C:\\Windows\\system32\\notepad.exe,-469<\/td>\n<td>11\/23\/1998 1:52 PM<\/td>\n<\/tr>\n<tr>\n<td>Proposal<\/td>\n<td>@&#8221;C:\\Program Files\\Windows NT\\Accessories\\WORDPAD.EXE&#8221;,-190<\/td>\n<td>10\/31\/1998 10:32 AM<\/td>\n<\/tr>\n<\/table>\n<p> instead of<\/p>\n<table style=\"background: white;color: black;border: black;border-collapse: collapse\">\n<tr>\n<td style=\"border: solid black .75pt\">Name<\/td>\n<td style=\"border: solid black .75pt;width: 30ex\">Type<\/td>\n<td style=\"border: solid black .75pt\">Modified<\/td>\n<\/tr>\n<tr>\n<td>House pictures<\/td>\n<td>Compressed Folder<\/td>\n<td>11\/16\/1998 4:09 PM<\/td>\n<\/tr>\n<tr>\n<td>notes<\/td>\n<td>Text Document<\/td>\n<td>11\/23\/1998 1:52 PM<\/td>\n<\/tr>\n<tr>\n<td>Proposal<\/td>\n<td>Rich Text Document<\/td>\n<td>10\/31\/1998 10:32 AM<\/td>\n<\/tr>\n<\/table>\n<p> Designing and implementing all this was a major undertaking (that&#8217;s what happens when you have to retrofit something as opposed to designing it in from the beginning), and to keep the test matrix from growing quadratically in the number of supported languages, a decision was made early on to support dynamic language changes only if the starting language is English. So yes, you could have both English and Dutch resources installed, but you have to start with English and add Dutch and <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2006\/04\/24\/582153.aspx#582808\"> not the other way around<\/a>.\n Mind you, the implementation in Windows&nbsp;2000 was not perfect. There were still places where English strings appeared even after you switched the user interface language to Dutch or German, but things got better at each new version of Windows. Unfortunately, pretty much nobody knew about this feature, since it was marketed to large multinational corporations and not to your random everyday users who simply want to change the user interface to a language they are more comfortable with.\n For Windows&nbsp;2000 and Windows&nbsp;XP, you still had two ways of installing Windows with a German user interface: You could either install the English version and then add the German language pack (the fancy Windows&nbsp;2000 multilingual way), or you could install the fully-localized German version of Windows, just as you always did. In Windows&nbsp;Vista, fully-localized versions of Windows were dropped. From Windows&nbsp;Vista onwards, all versions of Windows consist of a base language-neutral version <a href=\"http:\/\/blogs.msdn.com\/michkap\/archive\/2007\/12\/17\/6784443.aspx\"> with a language pack installed on top<\/a>.<\/p>\n<p> While it&#8217;s true that <a href=\"http:\/\/www.pcworld.com\/article\/181144\/windows_finally_speaks_expats_language.html\"> access to the feature has improved in more recent versions of Windows<\/a>, the feature has existed for over a decade. But of course, that doesn&#8217;t stop people from claiming that it&#8217;s a &#8220;new&#8221; feature. Don&#8217;t let the facts get in the way of a good story. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the early days of Windows, there was a separate version of Windows for each language, and once you decided to install, say, the French version of Windows, you were locked into using French. You couldn&#8217;t change your mind and, say, switch to German. The reason for this is that there were bits and pieces [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-10193","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>In the early days of Windows, there was a separate version of Windows for each language, and once you decided to install, say, the French version of Windows, you were locked into using French. You couldn&#8217;t change your mind and, say, switch to German. The reason for this is that there were bits and pieces [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=10193"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/10193\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=10193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=10193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=10193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}