예제 #1
0
        public override void Configure(INancyEnvironment environment)
        {
            var allCultures = CultureInfo.GetCultures(CultureTypes.AllCultures)
                              .Select(x => x.Name)
                              .ToArray();

            var supportedCultures = allCultures
                                    .Concat(allCultures.Select(x => x.ToLowerInvariant()))
                                    .Concat(allCultures.Select(x => x.ToUpperInvariant()))
                                    .Distinct()
                                    .ToArray();

            environment.Globalization(supportedCultures, "en-US");

            base.Configure(environment);
        }