Beispiel #1
0
 /// <summary>
 /// Method loads localization file.
 /// </summary>
 public void Load()
 {
     try
     {
         localizationEntriesList = LangFileReader.LoadLocalizationText(fileFullPath);
         loaded = true;
     }
     catch (Exception e)
     {
         throw new Exception("Problem with loading localization.", e);
     }
 }
Beispiel #2
0
        private Localization ReadLocalizationFile(string fileFullPath, string fileName)
        {
            try
            {
                string languageTag  = fileName.Split('.')[0];//get filename without extension
                string languageName = LangFileReader.LoadLanguageName(fileFullPath);

                return(new Localization(languageTag, languageName, fileFullPath));
            }
            catch (Exception e)
            {
                throw new Exception("Problem with reading localization file: " + fileName, e);
            }
        }