SlideShare une entreprise Scribd logo
1  sur  40
Internationalization
Agenda
 What is Internationalization
 What it offers
 Sample Application
 How to use it
 Best Practices

 Questions
What is Internationalization
 Internationalization (i18n)

the process of changing your software so that it
isn't hardwired to one language/locale/culture.
 Localization (l10n)

the process of adding the appropriate resources to
your software so that a particular language/locale is
supported.
What is Internationalization
 The terms are frequently abbreviated to

the numeronyms i18n (where 18 stands for the number of
letters between the first i and last n in internationalization, a
usage coined at DEC in the 1970s or
80s) and L10n respectively, due to the length of the words.
 Some companies, like IBM and Sun Microsystems, use the

term "globalization" for the combination of
internationalization and localization.
 Microsoft defines Internationalization as a combination of

World-Readiness and localization. World-Readiness is a
developer task, which enables a product to be used with
multiple scripts and cultures (globalization) and separating
user interface resources in a localizable format
(localizability, abbreviated to L12y).
What it offers
 Build once, sell anywhere
 Modularity demands it!
 Ease of translation

 “With the addition of localization data, the same

executable can be run worldwide.”
Characteristics
 Textual elements such as status messages and

the GUI component labels are not hardcoded in
the program. Instead, they are stored outside the
source code and retrieved dynamically.
 Support for new languages does not require

recompilation.
 Other culturally-dependent data, such as dates

and currencies, appear in formats that conform to
the end-user's region and language.
Sample Application
 Before Internationalization
 After Internationalization
Before Internationalization
After Internationalization
% java I18NSample fr FR
Bonjour.
Comment allez-vous?
Au revoir.

% java I18NSample en US
Hello.
How are you?
Goodbye.
How does it work
1) Create Properties Files
2) Define the Locale
3) Create Resource Bundle
4) Fetch Text from Resource Bundle
Properties file
 A properties file stores information about the

characteristics of a program or environment. A
properties file is in plain-text format.
 E.g.
greetings = Hello
farewell = Goodbye
inquiry = How are you?
Locale
 The Locale object identifies a particular language






and country.
has the form xx_YY
xx is two-character language code (ISO-639)
YY is two-character country code (ISO-3166)
Examples:
 en_US - United States English
 en_GB - Great Britain English
 es_MX - Mexico Spanish (Espanol)
1) Create Properties file
 MessagesBundle_fr_FR.properties
greetings = Bonjour.
farewell = Au revoir.
inquiry = Comment allez-vous?

 Keys remains same, values changes
2) Define the locale
3) Create a ResourceBundle
4) Fetch Text from
ResourceBundle
What may need
Internationalization
 Just a few thing

 And some more

 messages

• numbers

 labels on GUI

• currencies









components
online help
sounds
colors
graphics
icons
dates
times

• measurements
• phone numbers
• honorifics and personal

titles
• postal addresses
• page layouts
What’s easily translatable?
 Status messages
 Error messages
 Log file entries
 GUI component labels
 BAD!
Button okButton = new Button(“OK”);

 GOOD!
String okLabel = ButtonLabel.getString("OkKey");
Button okButton = new Button(okLabel);
What’s NOT (easily translatable)?


“At 1:15 PM on April 13, 1998, we attack the 7 ships on Mars.”

MessageBundle_en_US.properties
template = At {2,time,short} on {2,date,long}, we attack 
the {1,number,integer} ships on planet {0}.
planet = Mars
The time portion of a
Date object. The "short"
style specifies the
DateFormat.SHORT
formatting style.

The date portion of a Date
object. The same Date object
is used for both the date and
time variables. In the Object
array of arguments the index
of the element holding the
Date object is 2.

A Number
object, further
qualified with the
"integer" number
style.

The String in the
ResourceBundle
that corresponds
to the "planet"
key.
1. Compound Messages:
messageArguments...
 Set the message

arguments…
 Remember the

numbers in the
template refer to the
index in
messageArguments!
2. Compound Messages:
create formatter...
 Don’t forget setting

the Locale of the
formatter object...
3. Compound Messages:

 Get the template we

defined earlier…
 Then pass in our

arguments!
 And finally RUN...
Sample Run…
currentLocale = en_US
At 1:15 PM on April 13, 1998, we attack the 7 ships on the
planet Mars.
currentLocale = de_DE
Um 13.15 Uhr am 13. April 1998 haben wir 7 Raumschiffe auf dem
Planeten Mars entdeckt.
What’s NOT (easily translatable)?
 Plurals!

There
There
There

are no files
is one file
are 2 files

on XDisk.
on XDisk.
on XDisk.

Also variable...
3 possibilities
for output
templates.

Possible integer value in
one of the templates.
Plurals
ChoiceBundle_en_US.properties
pattern = There {0} on {1}.
noFiles = are no files
oneFile = is one file
multipleFiles = are {2} files

noFiles = are no files
oneFile = is one file
multipleFiles = are {2} files

There are 2 files on XDisk.
Plurals
 What’s different?
 Now we even

index our
templates… see
fileStrings, indexe
d with fileLimits.
 First create the

array of templates.
Sample Run
currentLocale = en_US
There
There
There
There

are no files on XDisk.
is one file on XDisk.
are 2 files on XDisk.
are 3 files on XDisk.

currentLocale = fr_FR
Il
Il
Il
Il

n' y a pas des
y a un fichier
y a 2 fichiers
y a 3 fichiers

fichiers sur XDisk.
sur XDisk.
sur XDisk.
sur XDisk.
Numbers
 Supported through NumberFormat!
o Shows what locales are available. Note, you can also
Locale[] create custom formats if needed.
locales = NumberFormat.getAvailableLocales();

345 987,246
345.987,246
345,987.246

fr_FR
de_DE
en_US
Currency
 Supported with:

NumberFormat.getCurrencyInstance!

9 876 543,21 F
fr_FR
9.876.543,21 DM
de_DE
$9,876,543.21
en_US
A Date and Time
 Supported with:
 DateFormat.getDateInstance
DateFormat dateFormatter =
DateFormat.getDateInstance(DateFormat.DEFAULT, currentLocale);

 DateFormat.getTimeInstance
DateFormat timeFormatter =
DateFormat.getTimeInstance(DateFormat.DEFAULT, currentLocale);

 DateFormat.getDateTimeInstance
DateFormat dateTimeFormatter = DateFormat.getDateTimeInstance(
DateFormat.LONG, DateFormat.LONG, currentLocale);
Date example
 Supported with: DateFormat.getDateInstance

9 avr 98
9.4.1998
09-Apr-98

fr_FR
de_DE
en_US
Unicode Characters
 16 bit!
 65,536 characters
 Encodes all major languages
 In Java Char is a Unicode character
 See unicode.org/

Future Use
ASCII

0x0000

Greek

Kana
Symbols

Internal

0xFFFF
Java support for the Unicode
Char
 Character API:










isDigit
isLetter
isLetterOrDigit
isLowerCase
isUpperCase
isSpaceChar
isDefined

 Unicode Char values accessed with:

String eWithCircumflex = new String("u00EA");
Java support for the Unicode
Char
 Example of some repair…
 BAD!

if ((ch
 GOOD!>=

'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
// ch is a letter

if (Character.isLetter(ch))
// ch is a letter
Java support for the Unicode
Char
 Get the Unicode category for a Char:







LOWERCASE_LETTER
UPPERCASE_LETTER
MATH_SYMBOL
CONNECTOR_PUNCTUATION
etc...

if (Character.getType('_') == Character.CONNECTOR_PUNCTUATION)
// ch is a “connector”
Next Steps - Internationalization
 Expedite and make necessary business decisions
 Identify the scope and timelines for

internationalization
 Implement design and code changes
Localization
 Identify the specific localization need
 Country / Culture
 Language(s) to be supported
 Pages / Interfaces / data elements to be localized

 Translation
 Language experts for translation
 Localize content (text, graphics, etc)
 Build a translation database, if required

 Implement design & code changes that may arise
Questions
Thank you ..
References:
 http://docs.oracle.com/javase/tutorial/i18n/index.h

tml
 https://www.slideshare.net
 https://www.google.com
 http://gwt.googleusercontent.com/samples/Showc
ase/Showcase.html

Contenu connexe

Tendances

Google flutter the easy and practical way
Google flutter the easy and practical wayGoogle flutter the easy and practical way
Google flutter the easy and practical wayAhmed Abu Eldahab
 
Designing applications with multimedia capabilities
Designing applications with multimedia capabilitiesDesigning applications with multimedia capabilities
Designing applications with multimedia capabilitiesK Senthil Kumar
 
WEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentWEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentRandy Connolly
 
Language translator
Language translatorLanguage translator
Language translatorSumitSumit26
 
What is dotnet (.NET) ?
What is dotnet (.NET) ?What is dotnet (.NET) ?
What is dotnet (.NET) ?Talha Shahzad
 
MobileAppDev Handout#1
MobileAppDev Handout#1MobileAppDev Handout#1
MobileAppDev Handout#1trupti1976
 
Front end web development
Front end web developmentFront end web development
Front end web developmentviveksewa
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Vibhawa Nirmal
 
Scripting languages
Scripting languagesScripting languages
Scripting languagesteach4uin
 
Flutter presentation.pptx
Flutter presentation.pptxFlutter presentation.pptx
Flutter presentation.pptxFalgunSorathiya
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | IntroductionJohnTaieb
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorialRohit Gupta
 
Designing applications with web access capabilities
Designing applications with web access capabilitiesDesigning applications with web access capabilities
Designing applications with web access capabilitiesK Senthil Kumar
 

Tendances (20)

Google flutter the easy and practical way
Google flutter the easy and practical wayGoogle flutter the easy and practical way
Google flutter the easy and practical way
 
Firebase PPT
Firebase PPTFirebase PPT
Firebase PPT
 
What is Flutter
What is FlutterWhat is Flutter
What is Flutter
 
Designing applications with multimedia capabilities
Designing applications with multimedia capabilitiesDesigning applications with multimedia capabilities
Designing applications with multimedia capabilities
 
Flutter workshop
Flutter workshopFlutter workshop
Flutter workshop
 
WEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentWEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web Development
 
Language translator
Language translatorLanguage translator
Language translator
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
What is dotnet (.NET) ?
What is dotnet (.NET) ?What is dotnet (.NET) ?
What is dotnet (.NET) ?
 
MobileAppDev Handout#1
MobileAppDev Handout#1MobileAppDev Handout#1
MobileAppDev Handout#1
 
Front end web development
Front end web developmentFront end web development
Front end web development
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
Flutter presentation.pptx
Flutter presentation.pptxFlutter presentation.pptx
Flutter presentation.pptx
 
Flutter workshop
Flutter workshopFlutter workshop
Flutter workshop
 
Ajax
AjaxAjax
Ajax
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
Express js
Express jsExpress js
Express js
 
Angular tutorial
Angular tutorialAngular tutorial
Angular tutorial
 
Designing applications with web access capabilities
Designing applications with web access capabilitiesDesigning applications with web access capabilities
Designing applications with web access capabilities
 

En vedette

Lua 30+ Programming Skills and 20+ Optimization Tips
Lua 30+ Programming Skills and 20+ Optimization TipsLua 30+ Programming Skills and 20+ Optimization Tips
Lua 30+ Programming Skills and 20+ Optimization TipsHo Kim
 
Vacation Planner
Vacation PlannerVacation Planner
Vacation Plannerashkamodi
 
Honorary Degree Leaflet
Honorary Degree LeafletHonorary Degree Leaflet
Honorary Degree LeafletShirley
 
Lingkungan presentation - liz
Lingkungan presentation - lizLingkungan presentation - liz
Lingkungan presentation - lizliz
 
Career Development 101
Career Development 101Career Development 101
Career Development 101msexysmurf
 
Telstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities ReportTelstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities ReportTurlough Guerin
 
galeria wolontariatu
galeria wolontariatugaleria wolontariatu
galeria wolontariatukamula77
 
Designing Special Feature Pages
Designing Special Feature PagesDesigning Special Feature Pages
Designing Special Feature PagesJackie Hai
 
Sonder groupintromay2011
Sonder groupintromay2011Sonder groupintromay2011
Sonder groupintromay2011karenwhitney
 
What's Hot On Facebook - 19/10/2011
What's Hot On Facebook - 19/10/2011What's Hot On Facebook - 19/10/2011
What's Hot On Facebook - 19/10/2011David Nattriss
 
People of Durban
People of DurbanPeople of Durban
People of Durbandcuthbert
 
Skf q4 2010_pr_eng
Skf q4 2010_pr_engSkf q4 2010_pr_eng
Skf q4 2010_pr_engSKF
 
Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...
Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...
Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...www.DATTANADKARNI.COM
 
Presentatie Ps Verkort Klant
Presentatie Ps Verkort KlantPresentatie Ps Verkort Klant
Presentatie Ps Verkort Klantdvanstraalen
 

En vedette (20)

Lua 30+ Programming Skills and 20+ Optimization Tips
Lua 30+ Programming Skills and 20+ Optimization TipsLua 30+ Programming Skills and 20+ Optimization Tips
Lua 30+ Programming Skills and 20+ Optimization Tips
 
Vacation Planner
Vacation PlannerVacation Planner
Vacation Planner
 
Honorary Degree Leaflet
Honorary Degree LeafletHonorary Degree Leaflet
Honorary Degree Leaflet
 
Lingkungan presentation - liz
Lingkungan presentation - lizLingkungan presentation - liz
Lingkungan presentation - liz
 
Progressive Movement
Progressive MovementProgressive Movement
Progressive Movement
 
Career Development 101
Career Development 101Career Development 101
Career Development 101
 
Samri Ki Jawala
Samri Ki JawalaSamri Ki Jawala
Samri Ki Jawala
 
Genitori code week 2016
Genitori code week 2016 Genitori code week 2016
Genitori code week 2016
 
Visual I Solutions
Visual I SolutionsVisual I Solutions
Visual I Solutions
 
Dontjustchangeengine
DontjustchangeengineDontjustchangeengine
Dontjustchangeengine
 
Telstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities ReportTelstra\'s Climate Change Opportunities Report
Telstra\'s Climate Change Opportunities Report
 
galeria wolontariatu
galeria wolontariatugaleria wolontariatu
galeria wolontariatu
 
Designing Special Feature Pages
Designing Special Feature PagesDesigning Special Feature Pages
Designing Special Feature Pages
 
Sonder groupintromay2011
Sonder groupintromay2011Sonder groupintromay2011
Sonder groupintromay2011
 
What's Hot On Facebook - 19/10/2011
What's Hot On Facebook - 19/10/2011What's Hot On Facebook - 19/10/2011
What's Hot On Facebook - 19/10/2011
 
People of Durban
People of DurbanPeople of Durban
People of Durban
 
Skf q4 2010_pr_eng
Skf q4 2010_pr_engSkf q4 2010_pr_eng
Skf q4 2010_pr_eng
 
Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...
Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...
Datta Nadkarni portfolio 2014- Marketing Strategist for- Farmers, LensCrafter...
 
Twitter
TwitterTwitter
Twitter
 
Presentatie Ps Verkort Klant
Presentatie Ps Verkort KlantPresentatie Ps Verkort Klant
Presentatie Ps Verkort Klant
 

Similaire à Internationalization

Internationlization
InternationlizationInternationlization
InternationlizationTuan Ngo
 
GNU Internationalization Presentation
GNU Internationalization PresentationGNU Internationalization Presentation
GNU Internationalization PresentationJoe Turner
 
Avoiding Pitfalls with Internationalization & Localization
Avoiding Pitfalls with Internationalization & LocalizationAvoiding Pitfalls with Internationalization & Localization
Avoiding Pitfalls with Internationalization & LocalizationLogan Gauthier
 
Multi Lingual Websites In Umbraco
Multi Lingual Websites In UmbracoMulti Lingual Websites In Umbraco
Multi Lingual Websites In UmbracoPaul Marden
 
Localization and Shared Preferences in android
Localization and Shared Preferences in androidLocalization and Shared Preferences in android
Localization and Shared Preferences in androidAly Arman
 
Code as Data workshop: Using source{d} Engine to extract insights from git re...
Code as Data workshop: Using source{d} Engine to extract insights from git re...Code as Data workshop: Using source{d} Engine to extract insights from git re...
Code as Data workshop: Using source{d} Engine to extract insights from git re...source{d}
 
Case Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docxCase Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docxtroutmanboris
 
Software Internationalization Crash Course
Software Internationalization Crash CourseSoftware Internationalization Crash Course
Software Internationalization Crash CourseWill Iverson
 
FIT XXth World Congress in Berlin - SDL Tools Workshop
FIT XXth World Congress in Berlin - SDL Tools WorkshopFIT XXth World Congress in Berlin - SDL Tools Workshop
FIT XXth World Congress in Berlin - SDL Tools WorkshopPaul Filkin
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answersVigneshVijay21
 
Python Interview questions 2020
Python Interview questions 2020Python Interview questions 2020
Python Interview questions 2020VigneshVijay21
 
Python interview questions
Python interview questionsPython interview questions
Python interview questionsPragati Singh
 

Similaire à Internationalization (20)

Internationlization
InternationlizationInternationlization
Internationlization
 
F# Tutorial @ QCon
F# Tutorial @ QConF# Tutorial @ QCon
F# Tutorial @ QCon
 
GNU Internationalization Presentation
GNU Internationalization PresentationGNU Internationalization Presentation
GNU Internationalization Presentation
 
Avoiding Pitfalls with Internationalization & Localization
Avoiding Pitfalls with Internationalization & LocalizationAvoiding Pitfalls with Internationalization & Localization
Avoiding Pitfalls with Internationalization & Localization
 
Multi Lingual Websites In Umbraco
Multi Lingual Websites In UmbracoMulti Lingual Websites In Umbraco
Multi Lingual Websites In Umbraco
 
Technical Interview
Technical InterviewTechnical Interview
Technical Interview
 
Filehandlinging cp2
Filehandlinging cp2Filehandlinging cp2
Filehandlinging cp2
 
Localization and Shared Preferences in android
Localization and Shared Preferences in androidLocalization and Shared Preferences in android
Localization and Shared Preferences in android
 
Lecture10
Lecture10Lecture10
Lecture10
 
Python unit1
Python unit1Python unit1
Python unit1
 
Lab 1 Essay
Lab 1 EssayLab 1 Essay
Lab 1 Essay
 
Files
FilesFiles
Files
 
Code as Data workshop: Using source{d} Engine to extract insights from git re...
Code as Data workshop: Using source{d} Engine to extract insights from git re...Code as Data workshop: Using source{d} Engine to extract insights from git re...
Code as Data workshop: Using source{d} Engine to extract insights from git re...
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
 
Case Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docxCase Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docx
 
Software Internationalization Crash Course
Software Internationalization Crash CourseSoftware Internationalization Crash Course
Software Internationalization Crash Course
 
FIT XXth World Congress in Berlin - SDL Tools Workshop
FIT XXth World Congress in Berlin - SDL Tools WorkshopFIT XXth World Congress in Berlin - SDL Tools Workshop
FIT XXth World Congress in Berlin - SDL Tools Workshop
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
 
Python Interview questions 2020
Python Interview questions 2020Python Interview questions 2020
Python Interview questions 2020
 
Python interview questions
Python interview questionsPython interview questions
Python interview questions
 

Dernier

Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 

Dernier (20)

Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 

Internationalization

  • 2. Agenda  What is Internationalization  What it offers  Sample Application  How to use it  Best Practices  Questions
  • 3. What is Internationalization  Internationalization (i18n) the process of changing your software so that it isn't hardwired to one language/locale/culture.  Localization (l10n) the process of adding the appropriate resources to your software so that a particular language/locale is supported.
  • 4. What is Internationalization  The terms are frequently abbreviated to the numeronyms i18n (where 18 stands for the number of letters between the first i and last n in internationalization, a usage coined at DEC in the 1970s or 80s) and L10n respectively, due to the length of the words.  Some companies, like IBM and Sun Microsystems, use the term "globalization" for the combination of internationalization and localization.  Microsoft defines Internationalization as a combination of World-Readiness and localization. World-Readiness is a developer task, which enables a product to be used with multiple scripts and cultures (globalization) and separating user interface resources in a localizable format (localizability, abbreviated to L12y).
  • 5. What it offers  Build once, sell anywhere  Modularity demands it!  Ease of translation  “With the addition of localization data, the same executable can be run worldwide.”
  • 6. Characteristics  Textual elements such as status messages and the GUI component labels are not hardcoded in the program. Instead, they are stored outside the source code and retrieved dynamically.  Support for new languages does not require recompilation.  Other culturally-dependent data, such as dates and currencies, appear in formats that conform to the end-user's region and language.
  • 7. Sample Application  Before Internationalization  After Internationalization
  • 9. After Internationalization % java I18NSample fr FR Bonjour. Comment allez-vous? Au revoir. % java I18NSample en US Hello. How are you? Goodbye.
  • 10. How does it work 1) Create Properties Files 2) Define the Locale 3) Create Resource Bundle 4) Fetch Text from Resource Bundle
  • 11. Properties file  A properties file stores information about the characteristics of a program or environment. A properties file is in plain-text format.  E.g. greetings = Hello farewell = Goodbye inquiry = How are you?
  • 12. Locale  The Locale object identifies a particular language     and country. has the form xx_YY xx is two-character language code (ISO-639) YY is two-character country code (ISO-3166) Examples:  en_US - United States English  en_GB - Great Britain English  es_MX - Mexico Spanish (Espanol)
  • 13. 1) Create Properties file  MessagesBundle_fr_FR.properties greetings = Bonjour. farewell = Au revoir. inquiry = Comment allez-vous?  Keys remains same, values changes
  • 14. 2) Define the locale
  • 15. 3) Create a ResourceBundle
  • 16. 4) Fetch Text from ResourceBundle
  • 17. What may need Internationalization  Just a few thing  And some more  messages • numbers  labels on GUI • currencies        components online help sounds colors graphics icons dates times • measurements • phone numbers • honorifics and personal titles • postal addresses • page layouts
  • 18. What’s easily translatable?  Status messages  Error messages  Log file entries  GUI component labels  BAD! Button okButton = new Button(“OK”);  GOOD! String okLabel = ButtonLabel.getString("OkKey"); Button okButton = new Button(okLabel);
  • 19. What’s NOT (easily translatable)?  “At 1:15 PM on April 13, 1998, we attack the 7 ships on Mars.” MessageBundle_en_US.properties template = At {2,time,short} on {2,date,long}, we attack the {1,number,integer} ships on planet {0}. planet = Mars The time portion of a Date object. The "short" style specifies the DateFormat.SHORT formatting style. The date portion of a Date object. The same Date object is used for both the date and time variables. In the Object array of arguments the index of the element holding the Date object is 2. A Number object, further qualified with the "integer" number style. The String in the ResourceBundle that corresponds to the "planet" key.
  • 20. 1. Compound Messages: messageArguments...  Set the message arguments…  Remember the numbers in the template refer to the index in messageArguments!
  • 21. 2. Compound Messages: create formatter...  Don’t forget setting the Locale of the formatter object...
  • 22. 3. Compound Messages:  Get the template we defined earlier…  Then pass in our arguments!  And finally RUN...
  • 23. Sample Run… currentLocale = en_US At 1:15 PM on April 13, 1998, we attack the 7 ships on the planet Mars. currentLocale = de_DE Um 13.15 Uhr am 13. April 1998 haben wir 7 Raumschiffe auf dem Planeten Mars entdeckt.
  • 24. What’s NOT (easily translatable)?  Plurals! There There There are no files is one file are 2 files on XDisk. on XDisk. on XDisk. Also variable... 3 possibilities for output templates. Possible integer value in one of the templates.
  • 25. Plurals ChoiceBundle_en_US.properties pattern = There {0} on {1}. noFiles = are no files oneFile = is one file multipleFiles = are {2} files noFiles = are no files oneFile = is one file multipleFiles = are {2} files There are 2 files on XDisk.
  • 26. Plurals  What’s different?  Now we even index our templates… see fileStrings, indexe d with fileLimits.  First create the array of templates.
  • 27. Sample Run currentLocale = en_US There There There There are no files on XDisk. is one file on XDisk. are 2 files on XDisk. are 3 files on XDisk. currentLocale = fr_FR Il Il Il Il n' y a pas des y a un fichier y a 2 fichiers y a 3 fichiers fichiers sur XDisk. sur XDisk. sur XDisk. sur XDisk.
  • 28. Numbers  Supported through NumberFormat! o Shows what locales are available. Note, you can also Locale[] create custom formats if needed. locales = NumberFormat.getAvailableLocales(); 345 987,246 345.987,246 345,987.246 fr_FR de_DE en_US
  • 29. Currency  Supported with: NumberFormat.getCurrencyInstance! 9 876 543,21 F fr_FR 9.876.543,21 DM de_DE $9,876,543.21 en_US
  • 30. A Date and Time  Supported with:  DateFormat.getDateInstance DateFormat dateFormatter = DateFormat.getDateInstance(DateFormat.DEFAULT, currentLocale);  DateFormat.getTimeInstance DateFormat timeFormatter = DateFormat.getTimeInstance(DateFormat.DEFAULT, currentLocale);  DateFormat.getDateTimeInstance DateFormat dateTimeFormatter = DateFormat.getDateTimeInstance( DateFormat.LONG, DateFormat.LONG, currentLocale);
  • 31. Date example  Supported with: DateFormat.getDateInstance 9 avr 98 9.4.1998 09-Apr-98 fr_FR de_DE en_US
  • 32. Unicode Characters  16 bit!  65,536 characters  Encodes all major languages  In Java Char is a Unicode character  See unicode.org/ Future Use ASCII 0x0000 Greek Kana Symbols Internal 0xFFFF
  • 33. Java support for the Unicode Char  Character API:        isDigit isLetter isLetterOrDigit isLowerCase isUpperCase isSpaceChar isDefined  Unicode Char values accessed with: String eWithCircumflex = new String("u00EA");
  • 34. Java support for the Unicode Char  Example of some repair…  BAD! if ((ch  GOOD!>= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) // ch is a letter if (Character.isLetter(ch)) // ch is a letter
  • 35. Java support for the Unicode Char  Get the Unicode category for a Char:      LOWERCASE_LETTER UPPERCASE_LETTER MATH_SYMBOL CONNECTOR_PUNCTUATION etc... if (Character.getType('_') == Character.CONNECTOR_PUNCTUATION) // ch is a “connector”
  • 36. Next Steps - Internationalization  Expedite and make necessary business decisions  Identify the scope and timelines for internationalization  Implement design and code changes
  • 37. Localization  Identify the specific localization need  Country / Culture  Language(s) to be supported  Pages / Interfaces / data elements to be localized  Translation  Language experts for translation  Localize content (text, graphics, etc)  Build a translation database, if required  Implement design & code changes that may arise
  • 40. References:  http://docs.oracle.com/javase/tutorial/i18n/index.h tml  https://www.slideshare.net  https://www.google.com  http://gwt.googleusercontent.com/samples/Showc ase/Showcase.html

Notes de l'éditeur

  1. Internationalization (i18n) is the process of designing an application so that it can be adapted to different languages and regions, without requiring engineering changes.Localization (l10n) is the process of adapting software for a specific region or language by adding locale-specific components and translating text.According to Apple:Internationalization is the process of designing and building an application to facilitate localization. Localization, in turn, is the cultural and linguistic adaptation of an internationalized application to two or more culturally-distinct markets.
  2. You&apos;ve decided that this program needs to display these same messages for people living in France and Germany. Unfortunately your programming staff is not multilingual, so you&apos;ll need help translating the messages into French and German. Since the translators aren&apos;t programmers, you&apos;ll have to move the messages out of the source code and into text files that the translators can edit. Also, the program must be flexible enough so that it can display the messages in other languages, but right now no one knows what those languages will be.It looks like the program needs to be internationalized.
  3. There are several steps involved in the processCreate properties files (externalized locale-specific UI messages)Create the localeCreate a resource bundle (using the locale)Retrieve UI messages from the resource bundle
  4. In the example the properties files store the translatable text of the messages to be displayed. Before the program was internationalized, the English version of this text was hardcoded in the System.out.printlnstatements. The default properties file, which is called MessagesBundle.properties, contains the following lines:greetings = Hello farewell = Goodbye inquiry = How are you? Now that the messages are in a properties file, they can be translated into various languages. No changes to the source code are required.
  5. The French translator has created a properties file calledMessagesBundle_fr_FR.properties, which contains these lines:greetings = Bonjour. farewell = Au revoir. inquiry = Comment allez-vous? Notice that the values to the right side of the equal sign have been translated but that the keys on the left side have not been changed. These keys must not change, because they will be referenced when your program fetches the translated text.The name of the properties file is important. For example, the name of the MessagesBundle_fr_FR.properties file contains the fr language code and the FR country code. These codes are also used when creating a Locale object.To compile and run this program, you need these source files:I18NSample.javaMessagesBundle.propertiesMessagesBundle_de_DE.propertiesMessagesBundle_en_US.propertiesMessagesBundle_fr_FR.properties
  6. To compile and run this program, you need these source files:I18NSample.javaMessagesBundle.propertiesMessagesBundle_de_DE.propertiesMessagesBundle_en_US.propertiesMessagesBundle_fr_FR.properties
  7. To compile and run this program, you need these source files:I18NSample.javaMessagesBundle.propertiesMessagesBundle_de_DE.propertiesMessagesBundle_en_US.propertiesMessagesBundle_fr_FR.properties
  8. To compile and run this program, you need these source files:I18NSample.javaMessagesBundle.propertiesMessagesBundle_de_DE.propertiesMessagesBundle_en_US.propertiesMessagesBundle_fr_FR.properties
  9. What do you consider will require internationalization from your website ?Explain thru various examples from slides like , Text Lengths, Images, Language Direction, Fonts, Address Formats, Currency, Date Formats etcLength of text may varyIn terms of number of characters In terms of pixelsImpacts UIUnexpected text wrapsHidden / overlapping UI elementsWidth extending beyond page width / or getting croppedBitmaps &amp; ImagesSymbolic images may at time be understood differently in different countriesSome images may have adverse political / cultural impact in some countriesImages containing text may not represent the user’s language of choice.Some images / colors may lead to legal conflicts