Windows Vista 引入了三种伪区域设置的概念:
Pseudo Locale Locale Name LCID
=================== =========== ======
Base qps-ploc 0x0501
Mirrored qps-mirr 0x09ff
East Asian-language qps-asia 0x05fe
启用基本区域设置非常有用,因为您可以检查应用程序是否正在使用当前区域设置来格式化日期、时间、数字、金钱等项目。
例如,当当前区域设置设置为Base时,日期将被格式化为:
[Шěđлеśđαỳ !!!], 2006 年第 8 期 [Maŕςћ !!]
构建 Windows其实都是用pseudo来做的,然后本地化成英文:
伪本地化
为了防止常见的全球化错误,创建了伪本地化版本。伪本地化是用人工语言创建本地化产品的过程。该语言与英语相同,只是每个字符都是用视觉上与英语字符相似的不同字符书写的。除了完全由机器生成之外,我们创建伪本地化构建的方式与创建本地化构建的方式完全相同。因为即使是单一语言的美国软件开发人员也可以阅读伪本地化文本,因此它已被证明是在开发周期早期发现全球化问题的绝佳方法。在 Windows 7 Beta 中,一些 UI 元素仍处于伪本地化形式,从而引发了一些关于其含义的有趣理论。我们希望通过这篇博文能够解开这个谜团。 :-)
伪本地化 Windows 7 中的控制面板对话框
另一个值在使用这些区域设置时:它测试您的应用程序不假设 16 位 PRIMARYLANGID
由以下部分组成:
当 实际上 PRIMARYLANGID 是:
- 一个 10 位主ID语言 id
- 是 6 位子语言 id
或以图形方式:
+-----------------------+-------------------------+
| Sublanguage ID | Primary Language ID |
+-----------------------+-------------------------+
15 10 9 0 bit
这三个伪语言环境最终从第 8 位末尾消失(微软已经厌倦了这样做来破坏有缺陷的应用程序)。
如何在 Windows 中启用伪区域设置?
另请参阅
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:
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
发布评论
评论(4)
最初四个伪语言环境< /strong> 在控制面板中不可见:(archive.org)
您可以通过添加一些注册表项来启用它们:
这可以在 RegEdit 中完成:
然后您可以转到 <控制面板中的strong>区域和语言选项:
并选择伪区域设置:
<图片src="https://i.sstatic.net/egHDe.png" alt="在此处输入图像描述">
三种不同的伪语言环境用于测试 3 种语言环境:
Base < code>qps-ploc locale 用于类似英语的伪本地化。它的字符串是英语字符串的较长版本,使用非拉丁字符和重音字符而不是正常的脚本。此外,简单的拉丁字符串应与此语言环境按相反的顺序排序。
镜像
qpa-mirr
用于从右到左的伪数据,这是测试的另一个感兴趣的领域。East Asian
qps-asia
旨在利用大型 CJK 字符库,这对于测试也很有用。警告:不要不要尝试更改“系统区域设置”:
到新的伪语言环境:
否则在重新启动:
Windows 将无法启动:
唯一的修复方法是 从故障恢复控制台手动编辑注册表;恢复旧的
en-US
语言环境。警告
使用伪语言环境用于查找软件中的本地化错误。不幸的是,这也会让您发现其他人的软件中的错误;包括 Microsoft 的:
SQL Server Management Studio1 在使用其他区域设置时会崩溃 (Microsoft连接):
Microsoft Excel 将不再允许您输入函数(逗号用于分隔参数不再起作用)
Visual Studio 将不再允许您编辑逗号分隔的属性
SQL Server Management Studio 图表设计器报告错误
.NET 在日期和时间格式方面存在错误,显示
22////11////2011 4::::42:::: 53 P̰̃M]
Windows 事件查看器:
任务计划程序:
SQL Server Management Studio:
祝 Microsoft 测试他们自己的产品好运。
110.50.1617.0
更新 4//10/2012:
尝试在 SQL Server Management Studio 中编辑表的前 200 行:
通过将负号符号从
--
更改为-
。额外阅读
Initially the four pseudo-locale's are not visible in the Control Panel: (archive.org)
You enable them by adding some registry keys:
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:
Is fixed by changing Negative sign symbol from
--
to-
.Bonus Reading
您还可以更改 Internet Explorer 的
Accept-Languages
以请求qps-ploc
语言:您可以使用它来测试您的网站是否支持 psuedo-locale,并检查任何缺少的本地化:
您可以看到我在其中遗漏了两段文字示例网站。
You can also change Internet Explorer's
Accept-Languages
to requestqps-ploc
language:You can use this to test that your web-site supports psuedo-locale, and check any missing localizations:
You can see i missed two bits of text in this sample web-site.
看起来,微软并没有修复 .NET、SQL Server、Excel 等中的本地化错误,而是更改了 Windows 10 中的伪区域设置来掩盖这些错误:
LOCALE_SLANGUAGE
LOCALE_SENGLANGUAGE
LOCALE_SDECIMAL
LOCALE_SCURRENCY
LOCALE_SMONDECIMALSEP
LOCALE_SDATE
LOCALE_STIME
LOCALE_SSHORTDATE
LOCALE_STIMEFORMAT
LOCALE_ITIME
LOCALE_ICENTURY
LOCALE_SNEGATIVESIGN
我可以理解不想修复你的错误,因为你很懒,这太难了。但你应该被迫让所有人都看到你的耻辱。
相反,你会逃避并试图掩盖你的失败。那太糟糕了。
It looks like rather than fixing the localization bugs in .NET, SQL Server, Excel, etc, Microsoft changed the Pseudo locale in Windows 10 to mask the bugs:
LOCALE_SLANGUAGE
LOCALE_SENGLANGUAGE
LOCALE_SDECIMAL
LOCALE_SCURRENCY
LOCALE_SMONDECIMALSEP
LOCALE_SDATE
LOCALE_STIME
LOCALE_SSHORTDATE
LOCALE_STIMEFORMAT
LOCALE_ITIME
LOCALE_ICENTURY
LOCALE_SNEGATIVESIGN
I can understand not wanting to fix your bugs, because you're lazy it's too hard. But you should have been forced to wear your shame for all to see.
Instead you cop-out and try to hide your failure. That's just bad.
Windows 10 1803
不幸的是,as从 Windows 10 1803 开始,似乎无法再启用这些区域设置:存档
根据 无法使用1803 Win 10 更新后的伪语言环境 存档
手动配置的注册表值
以下是从 1607 系统导出的值。可以将它们放入
.reg
文件中以便于导入。如果使用
.reg
文件,则需要以下标头:Pseudo (Pseudo) [qps-ploc]
HKCU_Control Panel_Internaltional - qps-ploc - W7.reg (在 MS 放弃修复本地化错误之前)
伪(伪亚洲)[qps-ploca]
伪(伪镜像)[qps-plocm]
伪(伪自主机)[qps-Latn-x-sh]
Windows 10 1803
Unfortunately, as of Windows 10 1803, it appears to no longer be possible to enable these locales: archive
According to Unable to use psuedo locales after 1803 Win 10 update archive
Registry values for manual config
Here are the exported values from a 1607 system. They can be put into a
.reg
file for easy import.If using a
.reg
file, the following header is required:Pseudo (Pseudo) [qps-ploc]
HKCU_Control Panel_Internaltional - qps-ploc - W7.reg (before MS gave up on fixing their localization bugs)
Pseudo (Pseudo Asia) [qps-ploca]
Pseudo (Pseudo Mirrored) [qps-plocm]
Pseudo (Pseudo Selfhost) [qps-Latn-x-sh]