/// <summary> /// Return the string value associated with a particular resource ID. /// </summary> /// <returns>Localized string.</returns> /// <param name="id">String resource ID.</param> public static string GetString(R.sections.Version.strings id) { UnityTranslationInternal.Translator.LoadSection(R.sections.SectionID.Version, false); if ( UnityTranslationInternal.Translator.tokens[(int)R.sections.SectionID.Version + 1].selectedLanguage != null && UnityTranslationInternal.Translator.tokens[(int)R.sections.SectionID.Version + 1].selectedLanguage.stringValues[(int)id] != null ) { return(UnityTranslationInternal.Translator.tokens[(int)R.sections.SectionID.Version + 1].selectedLanguage.stringValues[(int)id]); } else { return(UnityTranslationInternal.Translator.tokens[(int)R.sections.SectionID.Version + 1].defaultLanguage.stringValues[(int)id]); } }
/// <summary> /// Return the string value associated with a particular resource ID, substituting the format arguments as defined in string.Format. /// </summary> /// <returns>Localized string.</returns> /// <param name="id">String resource ID.</param> /// <param name="formatArgs">Format arguments.</param> public static string GetString(R.sections.Version.strings id, params object[] formatArgs) { return(string.Format(GetString(id), formatArgs)); }