예제 #1
0
        /// <summary>
        /// Returns the translated string for the specified <see cref="CultureInfo"/>, using the passed <see cref="CultureInfo"/>.
        /// If no <see cref="CultureInfo.CurrentCulture"/> is passed, the <see cref="CultureInfo"/> is used.
        /// </summary>
        /// <param name="code">The <see cref="TranslationCode"/>.</param>
        /// <param name="cultureInfo">The <see cref="TranslationCode"/> (optional).</param>
        /// <returns>The translated text.</returns>
        public static string GetTranslation(this TranslationCode code, CultureInfo cultureInfo = null)
        {
            cultureInfo ??= CultureInfo.CurrentCulture;

            return(Exceptions.ResourceManager
                   .GetString(code.ToString(), cultureInfo));
        }
예제 #2
0
 public static string GetTranslation(TranslationCode translationCode)
 {
     return Translations.ResourceManager.GetString(translationCode.ToString());
 }
예제 #3
0
파일: Translator.cs 프로젝트: abb-iss/Sando
 public static string GetTranslation(TranslationCode translationCode)
 {
     return(Translations.ResourceManager.GetString(translationCode.ToString()));
 }