Exemple #1
0
        public static void Set(string language, string key, string text)
        {
            if (string.IsNullOrEmpty(language))
            {
                throw new ArgumentException("language is null or empty");
            }
            if (string.IsNullOrEmpty(key))
            {
                throw new ArgumentException("key is null or empty");
            }
            if (string.IsNullOrEmpty(text))
            {
                throw new ArgumentException("text is null or empty");
            }
            if (!majorVocabulary.ContainsKey(language))
            {
                throw new ArgumentException("language is invalid");
            }

            majorVocabulary[language][key] = text;
            LanguageCache.OnLanguageChanged();
        }
Exemple #2
0
 public static void Clear()
 {
     majorVocabulary.ForEach(x => x.Value.Clear());
     LanguageCache.OnLanguageChanged();
 }