Exemplo n.º 1
0
        ///  <summary>
        ///  Will attempt to load a language file based off of the provided culture, otherwise it will default to either the system culture, en-us, or the first one avalaible.
        ///  </summary>
        public static void InitDefaultAs(CultureInfo ci)
        {
            var languages = LanguageStrings.GetAvalableLanguages();

            if (languages.Length == 0)
            {
                throw new Exception("No lanuage files found!");
            }
            if (languages.Length == 1)
            {
                _strings = languages[0];
            }
            InitAs(ci, languages);
        }
Exemplo n.º 2
0
        public static void InitDefault()
        {
            var languages = LanguageStrings.GetAvalableLanguages();

            if (languages.Length == 0)
            {
                throw new Exception("No lanuage files found!");
            }
            if (languages.Length == 1)
            {
                _strings = languages[0];
                return;
            }
            InitAs(CultureInfo.CurrentUICulture, languages);
            if (_strings == null)
            {
                _strings = languages[0];
            }
        }