Globalization Of Software

1,385 views

Published on

Overview of SW GUI globalization, internationalization and localization with focus on .NET environment

Published in: Software, Technology, Business
  • Be the first to comment

  • Be the first to like this

Globalization Of Software

  1. 1. 国际化与本地化<br />Lokalisierung<br />Localisation<br />Lokalizáció <br />גלובליזציה ולוקליזציה<br />التعريبوالترجمة<br />Robert.Sayegh@gmail.com (2009)<br />Globalization & Localization<br />1<br />
  2. 2. This presentation provides a high level overview of the globalization aspects involved in SW development process<br />Robert.Sayegh@gmail.com (2009)<br />2<br />Disclaimer: globalization process of documentations is a whole complicated other process, and therefore not addressed in this presentation.<br />
  3. 3. Making software Global, by turning it Local<br />Robert.Sayegh@gmail.com (2009)<br />3<br />Globalization is the sum of all processes adapting SW products for potential use virtually everywhere<br />Externalization is the process of extracting the strings that require translation out from the SW<br />Localization is the creation of language locales and enabling switching between them during applications runtime.<br />Externalization (E13N)<br />Translation<br />Localization (L10N)<br />internationalization(I18N)<br />Internalization is the process of adapting SW for Globalization, including separating UI strings from logic, number formatting, threads propagating the culture, and more…<br />
  4. 4. Externalization<br /><ul><li>Externalization requires explicit access in the code to reach a translated resource!
  5. 5. Win-Forms (.Net 2 and earlier)
  6. 6. All UI text must reside in resource string-table files
  7. 7. WPF (.Net 3 and above)
  8. 8. All XAML files can automatically be translated.
  9. 9. Other UI text (e.g. Reports, special messaging, etc.) must reside in resource string-table files</li></ul>Robert.Sayegh@gmail.com (2009)<br />4<br />
  10. 10. String Table Resource<br />Strings are entries in the resource table<br /><ul><li>Key: The name of the string entry.
  11. 11. Value: The actual localized string. Full-correct grammar!
  12. 12. Comment: Explanation of UI location/context of text.</li></ul>Robert.Sayegh@gmail.com (2009)<br />5<br />
  13. 13. Strings conventions<br /><ul><li>Always use culture sensitive methods: Format(), To String(), Parse(), Try Parse()
  14. 14. Always write the whole-explicit text (even if duplicated!)</li></ul>Int x = 10;<br />// not sensitive to language semantics!string text = “Number is: “ + x;;// Good example for creating a UI text string<br />string text = String.Format(“Number is {0}: “, x);<br />6<br />Robert.Sayegh@gmail.com (2009)<br />
  15. 15. Externalization cont.<br /><ul><li>What if the code is already written?
  16. 16. FxCop
  17. 17. Scans code for any strings
  18. 18. > 85% false positive!
  19. 19. Require IL coding for suiting to your specific code
  20. 20. No other methodological way!
  21. 21. Internalization issues are much harder to find automatically.</li></ul>Robert.Sayegh@gmail.com (2009)<br />7<br />
  22. 22. Internalization (Numbers)<br /><ul><li>Formatting of Number, Date, Full-Name, ….
  23. 23. Full name: May be configurable in setting
  24. 24. Date: preferably by Windows’ regional settings.
  25. 25. Special care on reading numbers!
  26. 26. And more…</li></ul>Robert.Sayegh@gmail.com (2009)<br />8<br />
  27. 27. Internalization (Fonts)<br />The Microsoft .Net Frameworks provides two powerful mechanisms in the Font class, to support different fonts per the endless number of languages: Fonts Fallback and Fonts Strategy surrogating.<br />However, when text will not appear within GUI controls special care should be taken when matching fonts to languages (e.g. generating a PDF report via 3rd part SW) <br />Microsoft Sans Serif (Unicode font) does not embed the CJK glyphs (Chinese, Japanese, Korean).<br />Arial Unicode MS Unicode font has most glyphs used in probably all languages (Western I, II, Hebrew, Arabic, CJK, and more). However this font is distributed free only with Microsoft Office suits.<br />Programmatic solution may be adopted to match relevant font per specific language<br />Robert.Sayegh@gmail.com (2009)<br />9<br />
  28. 28. Internalization (RTL support)<br /><ul><li>Mirroring the controls layout, is out of scope of this presentation, as it requires special care on the SW design level.
  29. 29. However, some technical aspects of this issue include:
  30. 30. Use only with the intended most-inner control! As this property may affect in a form, the menus, title, and more!
  31. 31. Use the Global Boolean property to check language orientation (true/ false): </li></ul>CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft<br /><ul><li>Set the control’s enumerator property to mirror text direction (Yes, No, Inherit):</li></ul>Control.RightToLeft<br /><ul><li>Consider Using the following code snippet: </li></ul> if (CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft) { Control.RightToLeft = Yes;<br /> }<br />10<br />Robert.Sayegh@gmail.com (2009)<br />
  32. 32. Internalization Issues (… more)<br /><ul><li>Other Internalization issues include
  33. 33. Threads
  34. 34. Logic Strings in code
  35. 35. Bitmaps / Icons with text
  36. 36. Floating GUI</li></ul>Robert.Sayegh@gmail.com (2009)<br />11<br />
  37. 37. Localization (.Net) Mechanism<br />Robert.Sayegh@gmail.com (2009)<br />12<br />
  38. 38. SW UI Globalization Process<br />Robert.Sayegh@gmail.com (2009)<br />13<br />
  39. 39. Detectability Matrix<br />Robert.Sayegh@gmail.com (2009)<br />14<br />
  40. 40. Pseudo Translation<br />Robert.Sayegh@gmail.com (2009)<br />15<br />
  41. 41. On Screen!<br />Robert.Sayegh@gmail.com (2009)<br />16<br />English<br />Pseudo translation<br />
  42. 42. Truncated text<br />Robert.Sayegh@gmail.com (2009)<br />17<br />OK<br />Wrong Length<br />
  43. 43. Truncated Text cont.<br />Symptoms<br />Not enough space on the screen was left for translation. <br />People that wrote the UI requirements were not aware to localization.<br />German text on average is 30% longer than English text, some languages are worse!!<br />The shorter a word is, the more probability for longer translation<br />Solutions<br />Avoid the situation (e.g. text in separate lines) [Good UI design]<br />Adopt abbreviations [Bad – not always possible](e.g., “N.” instead of “Nein” in German)<br />Enlarge the UI element (quick & dirty) [Ugly!]<br />Robert.Sayegh@gmail.com (2009)<br />18<br />
  44. 44. (*) What is the translation of “Presets”?<br />Robert.Sayegh@gmail.com (2009)<br />19<br />(*) From: Gadi Wolach (2008)<br />
  45. 45. 1. Is the translation actually translated correctly?<br /><ul><li> English: “Report Display”
  46. 46. French translator: “Display the report”
  47. 47. Actual meaning: “add this display to the report”</li></ul>Linguistic verification(*)A sample is worth 1000 words!<br />Robert.Sayegh@gmail.com (2009)<br />20<br />(*) From: Gadi Wolach (2008)<br />
  48. 48. Linguistic verificationA sample is worth 1000 words!<br />2. Is the translation actually located correctly?<br />Robert.Sayegh@gmail.com (2009)<br />21<br />Screen 1<br />Screen 2<br />
  49. 49. Thank you<br />谢谢<br />Dankeschön<br />Merci<br />Köszönöm <br />תודה<br />شكراً<br />Robert.Sayegh@gmail.com (2009)<br />22<br />

×