-
Notifications
You must be signed in to change notification settings - Fork 154
Description
HI there, I am using this framework in one of my own projects and we wanted to support pseudo localization: https://msdn.microsoft.com/en-us/library/windows/desktop/dd319106(v=vs.85).aspx
To add support, I did the following, added those entries to the registry, so that CultureInfo("qps-ploc") for example generates a valid CultureInfo instantiation.
Then, I made a slight change to your regex expresssions to support 2 OR 3 character language codes in LanguageTag.cs:
`static readonly Regex m_regex_parseLangtag = new Regex(
@"^([a-zA-Z]{2,3})(?:-([a-zA-Z]{4}))?(?:-([a-zA-Z]{2}|[0-9]{3}))?$",
RegexOptions.CultureInvariant);`
`static readonly Regex m_regex_parseUrl = new System.Text.RegularExpressions.Regex(
@"^/([a-zA-Z]{2,3}(?:-[a-zA-Z]{4})?(?:-(?:[a-zA-Z]{2}|[0-9]{3}))?)(?:$|/)",
System.Text.RegularExpressions.RegexOptions.CultureInvariant);`
Then in the locales folder, you'll need to create a pseudo locale (ie, locale\qps-ploc), with a message.po file which has been pseudo localized. It helps with our localization testing as we can see right away what labels we may have missed, or code that isn't working without having to actually wait for real translations.
Just thought you might want to consider adding support for it in your code moving forward and so I can also update our framework without having to reapply the changes every time.