What is system.globalization And what’s the difference between it and localization

and to spice things a bit , what is the best approach for globalization in Asp.net Mvc App

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Globalization is about producing a map from strings or identifiers to translations in other languages, while Localization is about using that map to find the correct translation. Globalization happens during development, localization happens at runtime.

I’m not very experienced doing this with ASP.NET, but…

As for how, the most common approach I see is to have a dictionary per language per assembly (or per UI component), where the values are localized strings. The keys are typically readonly members on a static class or enum. There is often a convenience class whose members are the map from identifiers to localized messages.

The dictionaries are typically stored in separate files and in a format targeted to human translators.

More here: http://msdn.microsoft.com/en-us/library/aa478974.aspx

Method 2

From the W3C I18n FAQ:

Localization refers to the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a “locale”).

Internationalization (or globalization) is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.

I’ve never globalized an ASP.NET MVC application, so sorry if I can’t help you there.

Method 3

The System.Globalization namespace
contains classes that define
culture-related information, including
the language, the country/region, the
calendars in use, the format patterns
for dates, currency, and numbers, and
the sort order for strings.

As for what’s the difference between it and localization? I guess that can be explained as the difference between a car and a city. One is a destination and the other is how you get there.

I haven’t used ASP.NET MVC, but I have used Monorail which is similar. If I wanted to localize a MR app, I would probably use a separate tree of view files. So while, for english-only, I’d have:

ViewsHome*.asp
ViewsAdmin*.asp
ViewsProducts*.asp

for an internationalized app, I’d have something like:

enViewsHome*.asp
enViewsAdmin*.asp
enViewsProducts*.asp
deViewsHome*.asp
deViewsAdmin*.asp
deViewsProducts*.asp
esViewsHome*.asp
esViewsAdmin*.asp
esViewsProducts*.asp


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x