コード例 #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));
        }
コード例 #2
0
        static LocalizedString()
        {
            lock (syncRoot)
            {
                if (MatterControlTranslationMap == null)
                {
#if DEBUG && !__ANDROID__
                    // In debug builds we load a translation map capable of generating/updating master.txt
                    MatterControlTranslationMap = new AutoGeneratingTranslationMap("Translations", UserSettings.Instance.Language);
#else
                    MatterControlTranslationMap = new TranslationMap("Translations", UserSettings.Instance.Language);
#endif
                }
            }
        }
コード例 #3
0
		static LocalizedString()
		{
			lock(syncRoot)
			{
				if (MatterControlTranslationMap == null)
				{
#if DEBUG && !__ANDROID__
					// In debug builds we load a translation map capable of generating/updating master.txt
					MatterControlTranslationMap = new AutoGeneratingTranslationMap("Translations", UserSettings.Instance.Language);
#else
					MatterControlTranslationMap = new TranslationMap("Translations", UserSettings.Instance.Language);
#endif
				}
			}
		}
コード例 #4
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);
		}
コード例 #5
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));
        }
コード例 #6
0
 public static void ResetTranslationMap()
 {
     MatterControlTranslationMap = null;
 }
コード例 #7
0
 public static void ResetTranslationMap()
 {
     MatterControlTranslationMap = new TranslationMap("Translations", UserSettings.Instance.Language);
 }
コード例 #8
0
		public static void ResetTranslationMap()
		{
			MatterControlTranslationMap = null;
		}
コード例 #9
0
		public static void ResetTranslationMap()
		{
			MatterControlTranslationMap = new TranslationMap("Translations", UserSettings.Instance.Language);
		}