コード例 #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
ファイル: Translator.cs プロジェクト: spati2/FSE-2012-SANDO
 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()));
 }