Localization framework

1,047 views

Published on

Lets find out what is localization, globalization and internationalization in .NET and how it works. Will peep into the Application directory as well as Resource file usage.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,047
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Localization framework

  1. 1. Localization Framework
  2. 2. Agenda• Localization, Internationalization & Globalization• .NET Package For You• System.Globalization• System.Globalization.CultureInfo• Aplication Directory• Fallback Mechanism of Resource• Implementation
  3. 3. Localization, Internationalization & Globalization• Localization • Making your application support a specific language/locale.• Internationalization • Making your application able to support a range of languages and locales• Globalization • The combination of Internationalization and Localization• Language & Locale Language Locale
  4. 4. .NET Package For You I/O Collections Security Reflection Diagnostics Threading Net Serialization ServiceProcess Globalization Resources Text • System.Globalization Core Locale services (Date/Time, Currency, Language Processing etc.) • System.Resource Multi-Lingual Resource Services • System.Text Core character conversion Services. (To/From Unicode)
  5. 5. System.Globalization• Culture-aware String Services • Casing, Comparison, Collation, Segmentation, Enumeration etc.• Date-Time Formatting • dd/mm/yy, mm/dd/yyyy etc.• Numeric Formatting • 12,000,000 and 12.000.000• Calendar Support • Gregorian, non-gregorian
  6. 6. System.Globalization.CultureInfo • Information about specific cultures i.e <LanguageCode>-<RegionCode> en-US es-ES fr-FR CultureInfo CurrentUICulture CurrentCultureCurrentUICulture : meant to cover the localization (a.k.a. localisation, a.k.a. translation) of Windows intoother languages.CurrentCulture : allows a user to take any language version of Windows (even if it is not their nativelanguage) and see defaults for date formats and number formats and order of text in sorted lists that makesense to them.
  7. 7. Application DirectoryThread.CurrentThread.CurrentUICulture = new CultureInfo(“en"); Application Directory Root .NET Application en en-US en-UK en-CA en-ES ja
  8. 8. Application Directory (Contd.) Thread.CurrentThread.CurrentUICulture = new CultureInfo(“en-CA"); Application Directory Root .NET Application en en-US en-UK en-CA es-ES ja
  9. 9. Resource Fallback MechanismFallback mechanism used to locate appropriateresources•Attempt to load “en-CA” resource assemble Resource Fallback Mechanism•If not available, load “en” assembly•If not available, load default application 3 Root .NET Applicationresources•Else raise an exception en 2 en-US en-UK en-CA 1 ja
  10. 10. • Resources are defined in XML documents Compilation Process – RESX Files• Filenames are significant – Resource.en-US.resx – Resource.en-UK.resx – Resource.en-CA.resx .resx file• Satellite Assemblies – For each language variant Resource.en-US.resx .resource file Resource.en-CA.resx .resource.dll file
  11. 11. How we implement Localization? Localization Process

×