Blog Posts for: Localization

Allowing user to set culture settings in ASP.NET 5: Part 2

10 November 2015

Introduction In my previous blog post I demonstrated how we can allow the user to save their culture preferences, and then apply the correct culture preferences once the user has signed in. We allowed the user to set the Culture and the UI Culture, but I think in a real world scenario that is not very realistic. Typically we will want to give the user more fine-grained control to set their language, date format, time format, currency etc.

Allowing user to set culture settings in ASP.NET 5: Part 1

03 November 2015

In a previous blog post I demonstrated how ASP.NET 5 determines which Culture settings to use when serving a request. That is fine for many cases, but in some instances you want to allow users to save their culture settings preferences in their user profile. This is Part 1 in a 2 part series when I will demonstrate how you can do this. In this blog post I will show you how we can allow a user to pick a specific culture and then save that against their user profile.

How ASP.NET 5 determines the culture settings for localization

20 October 2015

Introduction In ASP.NET 5, the Localization middleware can be used to ensure the correct culture settings are applied when serving a request. In this blog post I will walk you through the process which the Localization middleware takes to determine the correct culture settings to use when serving a request. I am using Beta 8, and have created a simple web application using the ASP.NET 5 Yeoman generator. Configuring the Localization middleware The first thing you will need to do is to enable the Localization middleware inside your application.

Setting the thread culture in ASP.NET 5

06 October 2015

Introduction I recently had to figure out how to set the Culture in an ASP.NET 5 application to a specific setting. The documentation on this is still non-existing, so this is how I figured out doing it by looking at Damian Edwards’ i18nStarterWeb sample project on Github. This information is current as of Beta 7. It may change in the future. The ASP.NET 4.6 way In ASP.NET 4.6 and before there were two typical ways in which you would be able to set the Culture and UI Culture to a specific value for a website.

Share translations between ASP.NET MVC and AngularJS

23 July 2014

I am currently helping a friend on a project which involves a mobile application running on iOS and Android, with a backend API and supporting administration website which is developed in ASP.NET MVC and Web API. The application is targeted at an international audience and one of the requirements were that the application should support multiple languages. I am responsible for the development of all the web related software and for the administration website I am using AngularJS with ASP.