The Owin/Katana counterpart of the standard Asp.net globalization module. It extends Asp.net Globalization in several ways.
The MVCControlsToolkit.Owin.Globalization Owin Globalization Module is available also as a
Nuget package in the official public Nuget feed, so the module may be installed by using the Visual Studio Nuget package installer.
Documentation may be found on the
author web site.
- It is completely free for both commercial and not commercial use.
- The developer may specify a default culture and a list of supported cultures(all cultures that are supported simultaneously by UI widgets like datepickers, and by the the .resx files included in the project).
- The selected culture is assigned to the current thread, and stored in a cookie and/or in the Url(http://mywebsite.com/en-US/...).
- A culture may be selected either by creating a globalization cookie and adding it to the response, if culture storing in cookies is enabled, or by issuing to the server a request that contains the chosen culture as the first segment of the Url path(http://mywebsite.com/en-US/...),
if culture storing in the Url is enabled.
- If no culture is selected the culture is extracted from the browser list of preferred cultures with a best match algorithm, and then it is set as the currently selected culture.
- If the culture specified in the path is different from the culture specified in the cookie, the module assumes that the user just clicked a link to change the culture, and uses the culture specified in the path as selected culture.
- If there is no perfect match between either a selected culture or the browser cultures the module look for a partial match of just the language part (for instance matching en-CA with en-US, or en). In case of ambiguity the first matching supported language
is chosen. If no partial match is found, the module reverts to the default culture. In any case the culture computed this way is set as the currently selected culture
- When adding a culture to the list supported cultures one may specify to use only the language part as UICulture (the one used to select the appropriate
.resx file). This way, for instance, we may specify both en-US, and en-CA, so that dates, numbers and currencies are dsplayed according to the country, while using an unique en .resx file for the English language.