Exemple #1
0
        public static string Get(string englishText)
        {
            string language = UserSettings.Instance.get("Language");

            if (language == null)
            {
                language = "en";
                UserSettings.Instance.set("Language", "en");
            }

            string pathToTranslationsFolder = "Translations";

            // Fall back to english if translation data isn't available
            if (!StaticData.Instance.DirectoryExists(pathToTranslationsFolder))
            {
                return(englishText);
            }

            if (MatterControlTranslationMap == null)
            {
                MatterControlTranslationMap = new TranslationMap(pathToTranslationsFolder, language);
            }
#if DEBUG_SHOW_TRANSLATED_STRINGS && DEBUG
            return("El " + englishText + " o");
#endif
            return(MatterControlTranslationMap.Translate(englishText));
        }
Exemple #2
0
        public static string Get(string englishText)
        {
            string language = UserSettings.Instance.get("Language");

            if (language == null)
            {
                language = "en";
                UserSettings.Instance.set("Language", "en");
            }

            if (MatterControlTranslationMap == null)
            {
                string pathToTranslationsFolder = "Translations";
                MatterControlTranslationMap = new TranslationMap(pathToTranslationsFolder, language);
            }
#if DEBUG_SHOW_TRANSLATED_STRINGS && DEBUG
            return("El " + englishText + " o");
#endif
            return(MatterControlTranslationMap.Translate(englishText));
        }
Exemple #3
0
 public static string Get(string englishText)
 {
     return(MatterControlTranslationMap.Translate(englishText));
 }