Пример #1
0
        public static Language GetSelectedLanguage(HttpContextBase context, string defaultCultureCode = null, Market market = null)
        {
            market = market ?? GetCurrentMarket(context);
            var cultureCode = GetSelectedCultureCode(context, defaultCultureCode);
            var language    = GlobalUtilities.GetLanguage(cultureCode, market);

            return(language);
        }
Пример #2
0
        public static Language GetLanguageByCustomerID(int customerID)
        {
            // Get the user's language preference based on their saved preference
            var customer = ExigoDAL.GetCustomer(customerID);
            var market   = GlobalUtilities.GetMarket(customer.MainAddress.Country);
            var language = GlobalUtilities.GetLanguage(customer.LanguageID, market);

            // Return the language
            return(language);
        }