/// <summary> /// Adds the language support /// </summary> /// <param name="language"><c>Language</c> object</param> public static void AddLanguageSupport(Language language) { checkLangCode(language.LangCode); if (string.IsNullOrEmpty(language.LanguageEnglish)) { throw new LocalizationException(Consts.ExceptionMessageNullEnglishLang); } LanguageConfiguration.AddLanguageSupport( language.LangCode, language.LanguageEnglish, language.LanguageLocal ); }
/// <summary> /// Gets supported languages list /// </summary> /// <returns>Supported languages list</returns> public static List <Language> GetSupportedLanguages() { return(LanguageConfiguration.GetSupportedLanguages()); }
/// <summary> /// Gets the language by two-letter code. /// </summary> /// <returns>The language by code.</returns> /// <param name="langCode">Two-letter language code (ISO 639-1)</param> public static Language GetLanguageByCode(string langCode) { return(LanguageConfiguration.GetLanguageByCode(langCode)); }
/// <summary> /// Checks if the language is supported /// </summary> /// <returns><c>true</c>, if the language is supported, <c>false</c> otherwise</returns> /// <param name="langCode">Two-letter language code (ISO 639-1)</param> public static bool CheckLanguageSupported(string langCode) { return(LanguageConfiguration.CheckLanguageSupported(langCode)); }