From the course: ASP.NET Core: Internationalization
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Localization based on URL request string - ASP.NET Core Tutorial
From the course: ASP.NET Core: Internationalization
Localization based on URL request string
- [Instructor] Now that we have our ASP.NET Core web project let's add the globalization to it. This demo will be very simple, but we will see the details of adding the localization service, and giving it a set of cultures that the application can use. Before we can get into the code, I do need to explain the order of the localization library's work to find the culture to use. There are three methods that your localized app will use to find its culture and they override the ones before it in the list. The first is by sending a culture on the request URL. That's what we're going to be looking at in this video. The second method is using a cookie and that will come in a later video. The last way, if you don't use a request URL or a cookie, we're going to use the culture that is set in the browser itself and we will get that information through the Accept-language HTTP header. Each of the methods has its own provider that will allow for that method to happen. Let's look at how to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.