Пример #1
0
 private static bool FixUserConfigLanguageInfo(CfgData cfgData, LanguageInfo languageInfo)
 {
     if (cfgData.Any())
     {
         var anyFieldFixed = cfgData.RemoveRow(GameConstants.SystemLanguagesKey) != null;
         if (cfgData.TryGetValue(GameConstants.CurrentLanguageKey, out var value) && (value != null))
         {
             if (languageInfo.Languages.Contains(value))
             {
                 languageInfo.Current = value;
             }
             else
             {
                 cfgData.RemoveRow(GameConstants.CurrentLanguageKey);
                 anyFieldFixed = true;
             }
         }
         return(anyFieldFixed);
     }
     return(false);
 }