diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/LanguagePolicy.cs b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/LanguagePolicy.cs index 2f10cad46e..ce3b10b1a0 100644 --- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/LanguagePolicy.cs +++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/LanguagePolicy.cs @@ -74,6 +74,20 @@ private static IDictionary DefaultPolicy(string[] defaultLangu policy.Add(language, fallback.ToArray()); } + // Locales like zh-CN, zh-TW, etc... are deprecated locales returned by CultureInfo. + // However, many still supply the old value when setting up WebChat. Since we + // really just need the progression to check for LG/LU files, we are manually adding + // them so that these files are found. This is OS version specific. + if (!policy.ContainsKey("zh-cn")) + { + policy.Add("zh-cn", new string[] { "zh-cn", "zh" }); + } + + if (!policy.ContainsKey("zh-tw")) + { + policy.Add("zh-tw", new string[] { "zh-tw", "zh" }); + } + return policy; } }