Getting Visual Studio to build pseudo-language (qps-ploc) satellite assemblies
Asked Answered
D

1

5

I've generated pseudo-localized versions of an app's resource files (for example Order Summary and Payment is localized as [[[[[Òŕd̂ër̊ S̀úm̂m̈år̀ý ân̈d̊ P̀áŷm̈e̊ǹt́]]]]]) so that we can test for localizability bugs ahead of getting actual translations.

I have named them using the qps-ploc resource identifier to match the existing pseudo-locale identifier, e.g. my pseudo-localized version of Details.resx is named Details.qps-ploc.resx.

However when I add these resx files to the project, Visual Studio ignores them. If I rename them using a "real" language code (such as Details.fr-FR.resx) then Visual Studio does create a subfolder named with this language code and builds the satellite assembly.

So it looks to me like Visual Studio rejects qps-ploc (without even a build warning). Am I missing something or can anyone suggest a way to get these qps-ploc resources built as part of my Visual Studio project?

Duaneduarchy answered 20/12, 2011 at 14:45 Comment(0)
C
4

The qps- locales work fine in my ASP.NET web application with .resx files (not compiled resource dll), however, I did find this MS article on enabling pseudo locales in the registry. Perhaps it will help.

Using Pseudo-Locales for Localization Testing

Additionally, you may wish to create custom locales, as given in this MS article:

How to: Create Custom Cultures

Best regards.

Clause answered 19/1, 2012 at 12:13 Comment(3)
Great answer, thank you! I added those registry entries from tinyurl.com/7ls3o7q (and rebooted) and now Visual Studio does recognize my qps-ploc resx files and builds satellite assemblies for them. So it appears that Visual Studio queries the system for a list of valid locale IDs, and that until those registry keys are added, the pseudo locales aren't enumerated by the system.Duaneduarchy
One more caveat: as per this MSDN page, qps-ploc is only truly supported from Server 2008 R2. In my place our build server runs an older version, and fails to build qps-ploc, so we had to pick a different locale name (one from the supported list that we knew we won't be using--not nice but no other option)Duaneduarchy
And one more caveat: per [this Microsoft Doc] (learn.microsoft.com/en-us/windows/desktop/Intl/…), the behaviour changed in Windows 1803 such that qps- locales will never appear in an enumerated list of locales - regardless of the magical registry entries that used to work. I am currently finding that Visual Studio (15.8.4) won't build qps-ploc resources, and I suspect this change is the cause. I've reported a problem about it from inside Visual Studio.Frippery

© 2022 - 2024 — McMap. All rights reserved.