Slide 1 of 30
Internationalization
Slide 2 of 30
Objectives
 Introduction to Internationalization
 Internationalization Process
 Internationalization Elem...
Slide 3 of 30
 Need of Internationalization
– Not all countries across the world speak or
understand English language
– S...
Slide 4 of 30
 The process of creating applications which
can adapt and adjust to various countries,
languages and region...
Slide 5 of 30
 The same executable application can run
worldwide
 Textual elements such as labels and
messages for GUI a...
Slide 6 of 30
 Numbers: The NumberFormat class is used to create locale-specific
formats for
– Numbers
– Currencies
– Per...
Slide 7 of 30
 Date and Time: The date and time format
should conform to the conventions of the
end user’s locale.
 The ...
Slide 8 of 30
 Unicode provides a unique number for every
character irrespective of platform, program or
language. Unicod...
Slide 9 of 30
1.Creating the Properties File
2.Defining the Locale
– Locale(String language, String country)
– Locale(Stri...
Slide 10 of 30
I18N & Formatting Tag Library
Slide 10 of 9
I18N & Formatting Tag Library
setLocale bundle setBundle message
Slide 11 of 30
I18N & Formatting Tag Library
<%@ taglib uri =
"http://java.sun.com/jsp/jstl/fmt" prefix =
“fmt" %>
<fmt:se...
Slide 12 of 30
I18N & Formatting Tag Library
– <fmt:formatNumber value=“numValue”
[type=“{number|currency|percent}”]
[maxI...
Slide 13 of 30
Date – Time Pattern
Slide 13 of 9
Slide 14 of 30
Upcoming SlideShare
Loading in …5
×

Session 8 : internationalization - Giáo trình Bách Khoa Aptech

830
-1

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
830
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Session 8 : internationalization - Giáo trình Bách Khoa Aptech

  1. 1. Slide 1 of 30 Internationalization
  2. 2. Slide 2 of 30 Objectives  Introduction to Internationalization  Internationalization Process  Internationalization Elements
  3. 3. Slide 3 of 30  Need of Internationalization – Not all countries across the world speak or understand English language – Symbols for currency vary across countries – Date and Time are represented differently in some countries – Spelling also varies amongst some countries  Alternatives to Solve the Problem – Develop the entire product in the desired language – Translate the entire product in the desired language
  4. 4. Slide 4 of 30  The process of creating applications which can adapt and adjust to various countries, languages and regions is known as internationalization. The word “internationalization” is often abbreviated as I18N.  The process of adapting an application for a specific language or country by addition of locale-specific components and translation of text is referred to as localization. The word “localization” is often abbreviated as L10N.
  5. 5. Slide 5 of 30  The same executable application can run worldwide  Textual elements such as labels and messages for GUI are not hard-code.  Support for new language does not require recompilation  Culturally dependent data, such as date and currency appear formats that conform.  Internationalized programs are localized quickly
  6. 6. Slide 6 of 30  Numbers: The NumberFormat class is used to create locale-specific formats for – Numbers – Currencies – Percentages  Methods
  7. 7. Slide 7 of 30  Date and Time: The date and time format should conform to the conventions of the end user’s locale.  The method below is used to get the DateFormat: – getDateInstance(style, locale)
  8. 8. Slide 8 of 30  Unicode provides a unique number for every character irrespective of platform, program or language. Unicode is a 16-bit character encoding system that supports the world’s major languages. The primitive data type char in Java is based on Unicode encoding.
  9. 9. Slide 9 of 30 1.Creating the Properties File 2.Defining the Locale – Locale(String language, String country) – Locale(String language) 1.Using the ResourceBundle class 2.Fetching the Text from Resource Bundle
  10. 10. Slide 10 of 30 I18N & Formatting Tag Library Slide 10 of 9 I18N & Formatting Tag Library setLocale bundle setBundle message
  11. 11. Slide 11 of 30 I18N & Formatting Tag Library <%@ taglib uri = "http://java.sun.com/jsp/jstl/fmt" prefix = “fmt" %> <fmt:setLocale value=“lc_CC” scope=“page | request | session | application” /> <fmt:bundle basename=“basename”> Body Content </fmt:bundle> <fmt:setBundle basename=“basename” var=“varName” scope=“page | request | session | application” /> <fmt:message key=“messageKey”> <fmt:param /> Slide 11 of 9
  12. 12. Slide 12 of 30 I18N & Formatting Tag Library – <fmt:formatNumber value=“numValue” [type=“{number|currency|percent}”] [maxIntegerDigits=“maxIntegerDigits”] [minIntegerDigits=“minIntegerDigits”] [maxFractionDigits=“maxFractionDigits”] [minFractionDigits=“minFractionDigits”] [var=“varName”] [scope=“{page|request|session|application}”] /> – <fmt:formatDate value=“date” [type=“{time|date|both}”] [dateStyle=“{default|short|medium|long|full}”] [timeStyle=“{default|short|medium|long|full}”] [var=“varName”] [timeZone=“timeZone”] [scope=“{page|request|session|application}”] [pattern=“dd-MM-yy”] /> Slide 12 of 9
  13. 13. Slide 13 of 30 Date – Time Pattern Slide 13 of 9
  14. 14. Slide 14 of 30
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×