Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Titanium alloy で国際化のススメ

1,812 views

Published on

最近の Titanium alloy の国際化について纏めました

静岡Titanium勉強会資料

Published in: Technology
  • Be the first to comment

Titanium alloy で国際化のススメ

  1. 1. Titanium Alloy Tadatoshi Hanazaki Appcelerator Platform 4.0
  2. 2. Titanium (Alloy) SDK 4.0.0.GA 3.4.0 4.1.0
  3. 3. About author Tadatoshi Hanazaki @hntn Titanium Certified Developer
  4. 4. Quick Start #1 • i18n/ code strings.xml ProjectFolder i18n │ en │ │ └ strings.xml │ ja │ │ └ strings.xml
  5. 5. Quick Start #2 • strings.xml i18n/en/strings.xml <resources> <string name=“TITLE_SIGNUP">Sign up</string> <string name=“LABEL_SEND">Send</string> </resources> i18n/ja/strings.xml <resources> <string name="TITLE_SIGNUP"> </string> <string name=“LABEL_SEND"> </string> </resources>
  6. 6. Quick Start #3 • View ※SDK 3.4.0 Alloy View app/view/index.xml <Alloy> <Window titleid=“TITLE_SIGNUP”> <ScrollView> … <Button onClick="doSignUp" titleid="LABEL_SEND"/>
  7. 7. Quick Start #4 : English :
  8. 8. #1 ※ tiapp.xml <name> strings.xml
  9. 9. #2 • i18n/ code app.xml ProjectFolder i18n │ en │ │ └ app.xml │ ja │ │ └ app.xml
  10. 10. #3 • app.xml i18n/en/app.xml <?xml version="1.0" encoding="UTF-8"?> <resources> <string name="appname"> </string> </resources> i18n/ja/app.xml <?xml version="1.0" encoding="UTF-8"?> <resources> <string name="appname">MyAppName</string> </resources>
  11. 11. SDK 3.1.x Android AndroidManifest.xml platform/ android/res/values-xx.xml SDK 3.2.0 ( ) iOS OK (Android)
  12. 12. iOS Ti.Media iOS
  13. 13. iOS Ti.Media.openPhotoGallery (ja)
  14. 14. iOS Ti.Media.showCamera (ja)
  15. 15. Ti
  16. 16. iOS iOS [ ] - [ ] - [ ] - [iPhone ]
  17. 17. Android Android [ ] -[ ] - [ ]
  18. 18. Android Ti Android
  19. 19. Android Change Language https://play.google.com/store/apps/details? id=com.examobile.changelanguage Google Play Kitkat Lolipop
  20. 20. 1) Ti.Locale.currentLocale 2) Ti.Locale.currentLanguage 3) Ti.Locale.currentCountry 4) Ti.Platform.locale ProjectFolder i18n │ en │ │ └ strings.xml │ ja │ │ └ strings.xml i18n/ ( SDK 4.0.0)
  21. 21. 1) Ti.Locale.currentLocale 2) Ti.Locale.currentLanguage 3) Ti.Locale.currentCountry 4) Ti.Platform.locale ProjectFolder i18n │ en │ │ └ strings.xml │ ja │ │ └ strings.xml ja-JP, en-JP, etc ja, en, etc JP, US, etc iOS:jp, en,etc Android:ja-JP, en-US, etc ex. i18n/ ( SDK 4.0.0)
  22. 22. 1) Ti.Locale.currentLocale 2) Ti.Locale.currentLanguage 3) Ti.Locale.currentCountry 4) Ti.Platform.locale ( SDK 4.0.0) ProjectFolder i18n │ en │ │ └ strings.xml │ ja │ │ └ strings.xml ※ (ISO-639-1) ( SDK 4.0.0) ja-JP, en-JP, etc ja, en, etc JP, US, etc iOS:jp, en,etc Android:ja-JP, en-US, etc ex.
  23. 23. Ti.Locale.currentLanguage iOS/Android
  24. 24. ( ) SDK 4.0.0
  25. 25. OS ※ Android (zh-rMO) (zh-rSG)
  26. 26. • i18n Directory ( ) ISO 639-1 • iOS Android • i18n/zh-Hant (iOS ) Android build ( SDK 4.0.0)
  27. 27. 2015 7 SDK 4.1.0.GA
  28. 28. SDK 4.1.0 -RegionSuffix ( ※) iOS/Android ※ISO-3166-1 Alpha2 code
  29. 29. (en-CA) (en-US) (en-GB)
  30. 30. ( ) SDK 4.1.0
  31. 31. Google Spreadsheet http://www.hanpendada.com/2015/01/google- spreadsheet.html
  32. 32. • Titanium (Alloy) • • SDK 4.1.0 • /

×