コード例 #1
0
        /// <summary>
        /// Set value for text
        /// </summary>
        /// <param name="text">Texts to set</param>
        /// <param name="language">Language to use</param>
        public static void SetTextValue(AbstractTranslatedText text, Language language)
        {
            if (!CheckLoaded())
            {
                return;
            }
            LoggingLevel log = instance.GetLoggingLevel();

            LoggingLevel.Development.Log(string.Format("LanguageManager: Setting value for [{0}] using Language [{1}]", text.name, language), log, text);
            text.SetText(GetTranslation(text.FieldName, language));
            LoggingLevel.Info.Log(string.Format("LanguageManager: Set [{0}] to [{1}]", text.name, text.GetText()), log, text);
        }
コード例 #2
0
        /// <summary>
        /// Set value for text
        /// </summary>
        /// <param name="text">Texts to set</param>
        public static void SetTextValue(AbstractTranslatedText text)
        {
            if (!CheckLoaded())
            {
                return;
            }
            LoggingLevel log = instance.GetLoggingLevel();

            LoggingLevel.Debug.Log(string.Format("LanguageManager: Using Language [{0}] and Key [{1}] to set value for [{2}]", text.UseCustomLanguage ? text.CustomLanguage : instance.currentLanguage, text.FieldName, text.name), log, text);
            text.SetText(GetTranslation(text.FieldName, text.UseCustomLanguage ? text.CustomLanguage : instance.currentLanguage));
            LoggingLevel.Info.Log(string.Format("LanguageManager: Set [{0}] to [{1}]", text.name, text.GetText()), log, text);
        }