Internationlization
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Internationlization

on

  • 463 views

 

Statistics

Views

Total Views
463
Views on SlideShare
463
Embed Views
0

Actions

Likes
0
Downloads
12
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Internationlization Presentation Transcript

  • 1. Internationalization
  • 2. What is internationalization? the process of creating applications which can adapt and adjust tovarious countries, languages, regions. I18N
  • 3. What is localization? the process of adapting an application for a specific language orcountry by addition of locale-specific components and translation of text. L10N
  • 4. Why need internationalization?
  • 5. Why need internationalization? Difference: - Language - Currency - Date and time
  • 6. Alternatives to solve the Problem? Develop product Translate product
  • 7. Benefits of I18N and L10N No hard coding No recompilation Localized quickly
  • 8. Unicode provide a unique number for every character irrespective of platform, program or language. Unicode is a 16-bit character encoding
  • 9. Significance of Unicode Java platform uses Unicode as its native character encoding. Uxxxx : X : hexadecimal digit
  • 10. Internationalization Process
  • 11. Properties file MessageBundle.properties MessageBundle_fr_FR.properties MessageBundle_de_DE.properties
  • 12. Locale Constructors: public Locale(String language, String country) public Locale(String language) Locale usLocale = new Locale(“en”,”us”)
  • 13. Methods public static Locale getDefault() public final String getDisplayCountry() public final String getDisplayLanguage()
  • 14. Resource Bundle Localized or translated into different languages Handled for multiple locales at the same time Supported for more locales later
  • 15. Using Resource Bundle ResourceBundle getBundle(String, Locale)
  • 16. Fetching the text from Resource Bundle public final String getString(String key)
  • 17. Fetching the text from Resource Bundle public abstract Enumeration <String> getKeys()
  • 18. Internationalization Elements
  • 19. Component Captions Caption text Dates Numerals Percentage
  • 20. Need for Formatting? 12345678 US 12,345,678 EU 12.345.678
  • 21. NumberFormat class getNumberInstance() getCurrencyInstance() getPercentInstance() format()
  • 22. DateFormat class DateFormat getDateInstance (style, locale)
  • 23. Formatting Message
  • 24. It is not always possible to create agrammatically correct sentences withconcatenation of phrases and variables.
  • 25. So we need MessageFormat.
  • 26. Steps for MessageFormat. Identify variables Create template Create object array Create instance Apply and Format