In this recipe, we will explain localization and its uses. Localization differs from internationalization in the way that localization refers to, for example, numeric, date and time formats, and the use of currency.
In this recipe we will be discussing the ever so important localization of our application.
When a user hits our website, we most likely want the user to automatically go to the right language. Although, there are several methods of doing this, we will be using a manual check to see if the language the user prefers is also in our list of languages.
We do this by a couple of simple tricks:
Accept-Languageheaders from the HTTP request