public static string GetLanguageFilesMap(this PlusLocalizationOptions localizationOptions, string packageName,
                                          string language)
 {
     return(localizationOptions.LanguageFilesMap.TryGetValue(packageName, out var maps)
         ? maps.FirstOrDefault(x => x.Name == language)?.Value ?? language
         : language);
 }
        public static PlusLocalizationOptions AddLanguagesMapOrUpdate(this PlusLocalizationOptions localizationOptions,
                                                                      string packageName, params NameValue[] maps)
        {
            foreach (var map in maps)
            {
                AddOrUpdate(localizationOptions.LanguagesMap, packageName, map);
            }

            return(localizationOptions);
        }
 public DefaultLanguageProvider(IOptions <PlusLocalizationOptions> options)
 {
     Options = options.Value;
 }