Globalization Of Software

  • View
    1.074

  • Download
    0

  • Category

    Software

Preview:

DESCRIPTION

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

Citation preview

国际化与本地化Lokalisierung

Localisation

Lokalizáció  

גלובליזציה ולוקליזציה

والترجمة التعريبRobert.Sayegh@gmail.com (2009)

Globalization & Localization

1

This presentation provides a high level overview of the globalization aspects involved in SW development process

Robert.Sayegh@gmail.com (2009) 2

Disclaimer: globalization process of documentations is a whole complicated other process, and therefore not addressed in this presentation.

Making software GLOBAL, by turning it LOCAL

Robert.Sayegh@gmail.com (2009) 3

Externalization (E13N)

internationalization(I18N)

Translation Localization (L10N)

Externalization is the process of extracting the strings that require translation out from the SW

Localization is the creation of language locales and enabling switching between them during applications runtime.

Internalization is the process of adapting SW for Globalization, including separating UI strings from logic, number formatting, threads propagating the culture, and more…

Globalization is the sum of all processes adapting SW products for potential use virtually everywhere

Externalization

Externalization requires explicit access in the code to reach a translated resource!

Win-Forms (.Net 2 and earlier) All UI text must reside in resource string-table

files

WPF (.Net 3 and above)

All XAML files can automatically be translated. Other UI text (e.g. Reports, special messaging,

etc.) must reside in resource string-table filesRobert.Sayegh@gmail.com (2009) 4

String Table Resource

Strings are entries in the resource table Key: The name of the string entry. Value: The actual localized string. Full-correct

grammar! Comment: Explanation of UI location/context of

text.

Robert.Sayegh@gmail.com (2009) 5

Strings conventions

Always use culture sensitive methods: Format(), To String(), Parse(), Try Parse()

Always write the whole-explicit text (even if duplicated!)

Int x = 10; // not sensitive to language semantics!string text = “Number is: “ + x;; // Good example for creating a UI text stringstring text = String.Format(“Number is {0}: “, x);

6Robert.Sayegh@gmail.com (2009)

Externalization cont.

What if the code is already written? FxCop

Scans code for any strings▪ > 85% false positive!

Require IL coding for suiting to your specific code

No other methodological way!

Internalization issues are much harder to find automatically.

Robert.Sayegh@gmail.com (2009) 7

Internalization (Numbers)

Formatting of Number, Date, Full-Name, …. Full name: May be configurable in setting Date: preferably by Windows’ regional settings. Special care on reading numbers! And more…

Robert.Sayegh@gmail.com (2009) 8

The number 1000 in different locales

English French German Swiss-German

1,000.00 1 000,00 1.000,00 1’000.00

Internalization (Fonts)

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.

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) Microsoft Sans Serif (Unicode font) does not embed the CJK glyphs

(Chinese, Japanese, Korean). 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.

Programmatic solution may be adopted to match relevant font per specific language

Robert.Sayegh@gmail.com (2009) 9

Internalization (RTL support) Mirroring the controls layout, is out of scope of this presentation,

as it requires special care on the SW design level.

However, some technical aspects of this issue include: Use only with the intended most-inner control! As this property may affect in a form,

the menus, title, and more!

Use the Global Boolean property to check language orientation (true/ false):

CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft

Set the control’s enumerator property to mirror text direction (Yes, No, Inherit):

Control.RightToLeft

Consider Using the following code snippet:if (CurrentThread.CurrentUICulture.TextInfo.IsRightToLeft)

{ Control.RightToLeft = Yes;

}

10Robert.Sayegh@gmail.com (2009)

Internalization Issues (… more)

Other Internalization issues include Threads Logic Strings in code Bitmaps / Icons with text Floating GUI

Robert.Sayegh@gmail.com (2009) 11

Localization (.Net) Mechanism

Robert.Sayegh@gmail.com (2009) 12

SW UI Globalization Process

Robert.Sayegh@gmail.com (2009) 13

Detectability Matrix

QA Issue Application misbehavior

Delectability

Missing Translation

Text appears in English although working in non-English locale.• English text wasn’t translated• Translation doesn’t show

Detectable prior to translation.

Wrong Translation

• Text is not translated properly, therefore is meaningless or misleading.

By linguist only!

Cut Translation UI element does not have enough space for the translated text.

Partially detectable prior to translation.! Fully detectable only

after translation.

Application Failure

Application fails to run properly because of working in non-English locale.• Threading, Parsing, etc.

Detectable prior to translation.

Robert.Sayegh@gmail.com (2009) 14

Pseudo Translation

Robert.Sayegh@gmail.com (2009) 15

On Screen!

Robert.Sayegh@gmail.com (2009) 16

English Pseudo translation

Truncated text

Robert.Sayegh@gmail.com (2009) 17

OK

Wrong Length

Truncated Text cont.

Symptoms Not enough space on the screen was left for translation. People that wrote the UI requirements were not aware to

localization. German text on average is 30% longer than English text,

some languages are worse!!▪ The shorter a word is, the more probability for longer translation

Solutions Avoid the situation (e.g. text in separate lines) [Good UI design]

Adopt abbreviations [Bad – not always possible](e.g., “N.” instead of “Nein” in German)

Enlarge the UI element (quick & dirty) [Ugly!]

Robert.Sayegh@gmail.com (2009) 18

(*) What is the translation of “Presets”?

Spanish French German

Valores predefinidos Paramètres prédéfinis VoreinstellungenDutch Finnish Swedish

Voorinstellingen Esiasetukset FörinställningarItalian Portuguese Danish

Preimpostazioni Predefinições ForudindstilletRussian Korean Chinese

Предварительные установки 사전 설정 预设

Robert.Sayegh@gmail.com (2009) 19

(*) From: Gadi Wolach (2008)

1. Is the translation actually translated correctly?

o English: “Report Display”o French translator: “Display the report”

Actual meaning: “add this display to the report”

Linguistic verification(*) A sample is worth 1000 words!

Robert.Sayegh@gmail.com (2009) 20

(*) From: Gadi Wolach (2008)

Linguistic verificationA sample is worth 1000 words!

2. Is the translation actually located correctly?

Robert.Sayegh@gmail.com (2009) 21

Screen 1

Screen 2

Thank you

谢谢Dankeschön

Merci

Köszönöm 

תודה� شكرا

Robert.Sayegh@gmail.com (2009) 22

Recommended