Closed StephenMcConnel closed 7 years ago
with one question
Reviewed 1 of 1 files at r1. Review status: all files reviewed at latest revision, 1 unresolved discussion.
src/L10NSharp/LocalizationManager.cs, line 405 at r1 (raw file):
{ var langId = Path.GetFileName(Path.GetDirectoryName(xliffFile)); if (System.Text.RegularExpressions.Regex.IsMatch(langId, "[a-z]{2,3}") || langId == "zh-CN")
This relaxes things as to length, but tightens them in requiring lower-case alphabetic ascii characters. I think that's what ISO requires, but just wanted to check that you've thought carefully about any problems it might cause.
Comments from Reviewable
Review status: all files reviewed at latest revision, 1 unresolved discussion.
src/L10NSharp/LocalizationManager.cs, line 405 at r1 (raw file):
This relaxes things as to length, but tightens them in requiring lower-case alphabetic ascii characters. I think that's what ISO requires, but just wanted to check that you've thought carefully about any problems it might cause.
Yes, ISO has 2-letter and 3-letter codes for languages, and the codes all consists of lowercase English/Latin letters without diacritics. We use the ISO code for the directory name. Before now, only 2-letter codes have been needed (these are available only for "major" languages), but there are a couple of languages with 3-letter codes in the pipeline for localization.
Comments from Reviewable
This is on the xliff branch.
This change is