Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TwoLetterISOLanguageName is insufficient for loading localized documentation #2933

Closed
sharwell opened this issue Mar 22, 2023 · 0 comments
Closed

Comments

@sharwell
Copy link
Contributor

The following two locations assume that localized documentation for the zh-Hans culture for path/to/A.dll will be located at path/to/zh/A.xml. In reality, the file may be located at path/to/zh-Hans/A.xml. These locations should be updated to look under a directory named CultureInfo.Name for documentation, and only fall back to checking for CultureInfo.TwoLetterISOLanguageName if the more specific check fails.

string currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;
string localizedXmlDocFile = GetLocalizedName(xmlFileName, currentCulture);

string currentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName;
string localizedXmlDocFile = GetLocalizedName(xmlFileName, currentCulture);

📝 It may also be possible to consolidate these two locations.

🔗 Discovered during a review of this user-reported issue:
https://developercommunity.visualstudio.com/t/The-annotation-information-of-the-class-/10288684

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant