Example #1
0
        static CustomLanguageLogic()
        {
            Languages = new List <CustomLanguageInfo>();

            var enUS = new CustomLanguageInfo {
                Key = "en-US", ImageUrl = "english.gif"
            };
            var daDK = new CustomLanguageInfo
            {
                Key       = "da-DK",
                ImageUrl  = "danish.gif",
                Fallbacks = new List <LanguageInfo> {
                    enUS
                }.ToList()
            };
            var whatever = new CustomLanguageInfo
            {
                Key       = "whatever",
                Culture   = CultureInfo.GetCultureInfo("en-US"),
                ImageUrl  = "whatever.gif",
                Fallbacks = new List <LanguageInfo> {
                    enUS
                }.ToList()
            };

            CurrentLanguage = enUS;

            Languages = new[] {
                enUS,
                daDK,
                whatever
            }.ToList();
        }
        static CustomLanguageLogic()
        {
            Languages = new List<CustomLanguageInfo>();

            var enUS = new CustomLanguageInfo { Key = "en-US", ImageUrl = "english.gif" };
            var daDK = new CustomLanguageInfo
            {                
                Key = "da-DK",
                ImageUrl = "danish.gif",
                Fallbacks = new List<LanguageInfo> { enUS }.ToList()
            };
            var whatever = new CustomLanguageInfo
            {
                Key = "whatever",
                Culture = CultureInfo.GetCultureInfo("en-US"),
                ImageUrl = "whatever.gif",
                Fallbacks = new List<LanguageInfo> { enUS }.ToList()
            };

            CurrentLanguage = enUS;

            Languages = new[] {
                    enUS,
                    daDK,
                    whatever
                }.ToList();
        }