示例#1
0
 public Language(int languageID, string cultureCode)
 {
     LanguageID            = languageID;
     CultureCode           = cultureCode;
     LanguageDescription   = CommonResources.Languages(this.LanguageID);
     EnglishDescription    = CommonResources.LanguagesEN(this.LanguageID);
     DescriptionWithMarket = (cultureCode.Substring(cultureCode.Length - 2)).ToUpper() + " - " + CommonResources.Languages(this.LanguageID);
 }
示例#2
0
        /// <summary>
        /// Gets the language's description from the Languages global resource file
        /// </summary>
        public string GetLanguageDescription()
        {
            var result = this.LanguageDescription;

            try
            {
                var resourceValue = CommonResources.Languages(this.LanguageID);
                if (resourceValue != null)
                {
                    result = (string)resourceValue;
                    this.LanguageDescription = result;
                }
            }
            catch { }

            return(result);
        }
示例#3
0
    /// <summary>
    /// Gets the language's description from the Languages global resource file
    /// </summary>
    public string GetLanguageDescription()
    {
        var result = this.LanguageDescription;
        var x      = System.Globalization.CultureInfo.CurrentUICulture;
        var y      = System.Globalization.CultureInfo.CurrentCulture;

        try
        {
            var resourceValue = CommonResources.Languages(this.LanguageID);
            if (resourceValue != null)
            {
                result = (string)resourceValue;
                this.LanguageDescription = result;
            }
        }
        catch { }

        return(result);
    }