Understanding Internationalization in ASP.NET MVC
Understanding Internationalization in ASP.NET MVC:
Internationalization is abbreviated to i18n, where 18 stands
for the number of letters in word Internationalization between the first i and
last n. Internationalization is the process of developing products/software in
such a way that they can be localized for languages and cultures easily. It
involves Globalization and Localization.
Globalization and Localization:
Globalization is abbreviated to G11n, where 11 stand for the
number of letters in word Globalization between the first G and last n. It is
the process of developing products/software in such a way that they can support
different cultures.
Localization is abbreviated to L10n, where 10 stand for the
number of letters in word Localization between the first L and last n. It is
the process of developing products/software’s in such a way that they can be
customize for a specific culture.
Culture in ASP.NET Framework:
ASP.NET framework has two cultures - Culture and UI Culture.
Typically, these cultures values are composed of two lower-case letters
defining the language and two upper case letters defining the locale (region).
For example, "en" represents English language and
"GB", "US" represent Britain and American respectively. In
this way British English is defined as "en-GB", while American
English is defined as "en-US".
The Culture determines the results of culture-dependent
functions like as date, number, and currency.
The UI Culture is used to locate correct resource file and
to be render it for a webpage by the Resource Manager.
Every thread in .NET has Current Culture and Current UI Culture
properties. These properties are used by ASP.NET globalization framework while
rendering culture-dependent functions and values.
Internationalization of Validation Messages:
To make you validation messages in different languages, you
need to add translated messages with a key for every culture, which your
application will support. In this article, I am going to add translated
messages for English and Hindi. Here, default culture is "en".
Comments
Post a Comment