Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use enable pseudo-locale in Windows for testing?

Windows Vista introduced the concept of three pseudo-locales:

Pseudo Locale        Locale Name  LCID           
===================  ===========  ======
Base                 qps-ploc     0x0501
Mirrored             qps-mirr     0x09ff
East Asian-language  qps-asia     0x05fe

Enabling the Base locale is useful, because you can check that your application is using the current locale for formatting of items such as dates, times, numbers, money.

For example when the current locale is set to Base, a date will be formatted as:

[Шěđлеśđαỳ !!!], 8 ōf [Μäŕςћ !!] ōf 2006

Builds of Windows are actually done in pseudo, and then localized into english:

Engineering Windows 7 for a Global Market

Pseudo-Localization

To prevent common globalization bugs, pseudo-localized builds were created. Pseudo-localization is a process that creates a localized product in an artificial language. That language is identical to English except that each character is written with a different character that visually resembles the English character. Except for being entirely machine generated, we create the pseudo-localized builds exactly the same way as we create the localized builds. Because even monolingual US software developers can read pseudo-localized text, it has proven to be an excellent way to find globalization problems early in the development cycle. In the Windows 7 beta, some UI elements were still in their pseudo-localized form, causing some interesting theories about what the meaning might be. We hope we have solved the mystery with this blog post. :-)

Pseudo-loc control panel

Control Panel Dialog in Pseudo-localized Windows 7

Another value in the use of these locale's: it tests that your application doesn't assume that a 16-bit PRIMARYLANGID is made up of an:

  • 8-bit primary language id
  • 8-bit sublanguage id

when in reality a PRIMARYLANGID is:

  • a 10-bit primary language id
  • a 6-bit sublanguage id

or graphically:

+-----------------------+-------------------------+
|     Sublanguage ID    |   Primary Language ID   |
+-----------------------+-------------------------+
 15                   10 9                       0   bit

These three pseudo-locale's finally walk off the end of the 8th bit (something that Microsoft has been weary of doing for breaking buggy applications).

How do i enable pseudo-locale's in Windows?

See also

  • MSDN: Pseudo-Locales
  • MSDN: Using Pseudo-Locales for Localization Testing
  • MSDN Blogs: Pseudo Locales in Windows Vista Beta 2
  • MSDN Blogs: One of my colleagues is the "Pseudo Man" (a rich source of puns in conversation!)
  • MSDN Blogs: Walking off the end of the eighth bit
like image 637
Ian Boyd Avatar asked Aug 12 '11 16:08

Ian Boyd


1 Answers

You can also change Internet Explorer's Accept-Languages to request qps-ploc language:

enter image description here

You can use this to test that your web-site supports psuedo-locale, and check any missing localizations:

enter image description here

You can see i missed two bits of text in this sample web-site.

like image 60
Ian Boyd Avatar answered Nov 03 '22 13:11

Ian Boyd