Sakai: Localization & Internationalization Beth Kirschner University of Michigan [email protected].
INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer...
-
Upload
annabelle-riley -
Category
Documents
-
view
246 -
download
0
Transcript of INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer...
![Page 1: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/1.jpg)
INTERNATIONALIZATION&
LOCALIZATION
HUY T. VU
![Page 2: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/2.jpg)
DEFINITION
• Internationalization: deploying a computer software internationally
• Localization: adapting an internationalized software for a specific region by translating into different languages and modifying contents to target the local market
***Problem in software industry: popular apps should be used internationally, but not everyone speaks the same language.
![Page 3: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/3.jpg)
EXAMPLE: THE FIFA WORLD CUP 2014
• 32 national teams participate in one of the world largest sport events
• Millions of fans WILL gather in Brazil & billions watching at home
• Demand for mobile apps: • Info, results, venues, analyses…• Travels, hotels, restaurant….• Photos, clips….
*** very diverse languages and cultures
![Page 4: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/4.jpg)
HOW TO LOCALIZE RESOURCES?
• When localizing, there are 2 types of resource
• Changing resources: String, Drawable, Animation, Audio….
• Unchanging resources: Layout
Solution: create sub-folders with codes (normally follow ISO 639-1 standard)
![Page 5: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/5.jpg)
SAMPLE: INTERNATIONAL APP
Create an empty app and define strings.xml as in the picture
![Page 6: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/6.jpg)
Make a Japanese version
Step:1. create a sub-folder “values-ja” under folder “res”
2. within that folder, create strings.xml file and prepare texts for 4 different string variables
*** ja is ISO 639-1 code for Japanese, list of language codes can be found here:http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
![Page 7: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/7.jpg)
Use custom locale on emulator
![Page 8: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/8.jpg)
TYPICAL ISSUE #1
• NOT all languages are supported on every devices (especially lesser popular languages such as those used by African nations)
• Need another approach
![Page 9: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/9.jpg)
CHANGE LOCALE DYNAMICALLY
STEP 1: for simplicity, create a RadioGroup of languages (this works better with Spinner in Android, but for simplicity, I use RadioGroup)
![Page 10: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/10.jpg)
STEP 2: modify the AndroidManifest.xml file by adding android:configChanges=“locale”to every activity that intends to change locale dynamically
![Page 11: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/11.jpg)
STEP 3: add codes in the activity to change locale and update configuration
![Page 12: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/12.jpg)
TYPICAL ISSUE #2
Both England and the USA are qualified for the World Cup. Both countries use English, but…
England• Football• WC• Plaza• Fuel• …
USA• Soccer• Restroom• Mall• Gas• …
![Page 13: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/13.jpg)
Localization:• Make another subfolder
specifying Great Britain• Assuming the default values
are for US-localization• Only include the strings that
are different
res/values/strings.xml
res/values-en-rGB/strings.xml
![Page 14: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/14.jpg)
Folder name convention: values-xx-rYY• xx is ISO 639-1 language code (2 letters)• r is region (must have)• YY is ISO 3166-1 country code (2 letters)• Use Locale constructor to interpret the code
![Page 15: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/15.jpg)
• People would like to see information about their national team
localize “drawable” resource
TYPICAL ISSUE #3
For images, it’s a little different, the previous resource must be nullified before setting new resource
![Page 16: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/16.jpg)
TYPICAL ISSUE #4• Date and Time format varies between countries• To localize date and time format, add the following codes
![Page 17: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/17.jpg)
DESIGN STANDARDS FOR INTERNATIONALIZATION
• Names are NOT translatable or localizable• Internationalized conventions are used by default (SI units, symbols,…)
![Page 18: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/18.jpg)
WHAT ABOUT THIS?
Design’s rule of thumb: ROMANIZATION
Texts should be displayed in Romanized form
![Page 19: INTERNATIONALIZATION & LOCALIZATION HUY T. VU. DEFINITION Internationalization: deploying a computer software internationally Localization: adapting an.](https://reader031.fdocuments.us/reader031/viewer/2022032107/56649ed85503460f94be6bcc/html5/thumbnails/19.jpg)
THANK YOU