如何在 Windows 中使用启用伪语言环境进行测试? [英] How to use enable pseudo-locale in Windows for testing?
问题描述
Windows Vista引入了三个 由以下部分组成:
- 8 位主要语言 ID
- 8 位子语言 ID
当 ;恢复旧的 en-US
语言环境.
警告
使用伪语言环境来查找软件中的本地化错误.不幸的是,这也会让您发现其他人的软件中的错误;包括微软:
SQL Server Management Studio1 在显示其他语言环境时会崩溃 ( (archive.is)
- 如何测试您的应用程序的 Iñtërnâtiônàlizætiøn?(国际化?)
- Michael Kaplan:我的一位同事是伪人"(对话中双关语的丰富来源!)(RIP)(archive.is)
- https://en.wikipedia.org/wiki/Pseudolocalization
- MSDN:使用伪语言环境进行本地化测试 归档支持>
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. :-)
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
How do i enable pseudo-locale's in Windows?
Initially the four pseudo-locale's are not visible in the Control Panel: (archive.org)
Note that NLS does not automatically enumerate the pseudo-locales or expose them in the regional and language options portion of the Control Panel. They are only enumerable if values are set in the registry.
You enable them by adding some registry keys:
[HKEY_LOCAL_MACHINESystemCurrentControlSetControlNlsLocale]
"00000501"="1" // qps-ploc (Windows Vista and later)
"000005fe"="7" // qps-ploca (Windows Vista and later)
"00000901"="1" // qps-Latn-x-sh (Windows 10 and later)
"000009ff"="d" // qps-plocm (Windows Vista and later)
Which can be done in RegEdit:
Then you can go to Regional and Language Options in the Control Panel:
and select the pseudo-locale:
The three different pseudo-locale are for testing 3 kinds of locales:
Base The qps-ploc
locale is used for English-like pseudo localizations. Its strings are longer versions of English strings, using non-Latin and accented characters instead of the normal script. Additionally simple Latin strings should sort in reverse order with this locale.
Mirrored qpa-mirr
is used for right-to-left pseudo data, which is another area of interest for testing.
East Asian qps-asia
is intended to utilize the large CJK character repertoire, which is also useful for testing.
Warning: Do not try to change the "System Locale":
to a new pseudo-locale:
Otherwise after the reboot:
Windows will fail to start:
And the only fix will be to manually edit the registry from the Recovery Console; restoring the old en-US
locale.
Warning
Use of pseudo-locales is used to find localization bugs in software. Unfortunately this will also let you find bugs in other people's software; including Microsoft's:
SQL Server Management Studio1 crashes when presented with other locales (Microsoft Connect):
Microsoft Excel will no longer let you enter functions (the comma used to separate parameters no longer works)
Visual Studio will no longer let you edit comma separated properties
The SQL Server Management Studio diagram designer reports an error
.NET has a bug in the date and time formatting, showing
22////11////2011 4::::42::::53 P̰̃M]
Windows Event Viewer:
Task Scheduler:
SQL Server Management Studio:
Good luck with getting Microsoft to dogfood their own product.
110.50.1617.0
Update 4//10/2012:
Trying to Edit top 200 rows of a table in SQL Server Management Studio:
Executed SQL statement SELECT TOP (200) ...
Error Source: Microsoft.SqlServer.Management.DataTools
Error Message: Object reference not set to an instance of an object
Is fixed by changing Negative sign symbol from --
to -
.
Bonus Reading
- Pseudo Locales in Windows Vista Beta 2 (archive.is)
- How do you test your app for Iñtërnâtiônàlizætiøn? (Internationalization?)
- Michael Kaplan: One of my colleagues is the "Pseudo Man" (a rich source of puns in conversation!) (RIP) (archive.is)
- https://en.wikipedia.org/wiki/Pseudolocalization
- MSDN: Using pseudo-locales for localizability testing archive
这篇关于如何在 Windows 中使用启用伪语言环境进行测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!