• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Internationlization
 

Internationlization

on

  • 405 views

 

Statistics

Views

Total Views
405
Views on SlideShare
405
Embed Views
0

Actions

Likes
0
Downloads
11
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 Internationlization Presentation Transcript

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