Slide 1

Slide 1 text

OUR APPLICATIONS INTERNATIONALIZING @thelegoless 

Slide 2

Slide 2 text

 Do we really think that most people will understand our applications in plain English? Should we maybe care for third world markets? WHY?

Slide 3

Slide 3 text

INTERNATIONALIZING OUR APPLICATIONS  3 NORTH AM. 0.5 billion English, Spanish, French, Danish, … SOUTH AM. 0.4 billion Spanish, Portugese, Dutch, English, … AFRICA 1.1 billion Afrikaans, Arabic, Swahili, Malagasy, Tsonga, … ASIA 4.2 billion Chinese, Hindi, Javanese, Vietnamese, … EUROPE 0.7 billion English, German, Italian, French, Spanish, … World Population

Slide 4

Slide 4 text

INTERNATIONALIZING OUR APPLICATIONS  4 INTERNATIONALIZATION When we are developing applications, we must keep in mind that internationalization is not easy. It might cost us a lot of time and resources, if by any case we need to go fixing things in entire application later. 

Slide 5

Slide 5 text

INTERNATIONALIZING OUR APPLICATIONS  5 Language Which language is user speaking? Which language does he view content in? In which language does he want to see content? Most expensive to get it right. Locale Language preferences, region settings, calendar type, default currency. Cannot use for: physical location, identifying language. Region Settings Specific date, time, energy, mass, distance, currency formatting settings. On mobile, many things supported out-of-the-box. A couple of terms

Slide 6

Slide 6 text

INTERNATIONALIZING OUR APPLICATIONS  6 There are many problems for international apps. But usually, when outputting text, we can sort these into 4 larger groups. NAMES TIME OTHER UNITS Localization

Slide 7

Slide 7 text

DATE & TIME } Lets take a look at date and time formats. They can be different not only per language, but even per region!

Slide 8

Slide 8 text

INTERNATIONALIZING OUR APPLICATIONS  8 The usual “hh:mm a”, but is that okay? Lets look at few examples of regular time formats. Most common time formatters are usually wrong. Formatting time 17:26 অপরাh ৫:২৬ 午後5:26 5:26 PM م٥:٢٦ 下午5:26 17.26

Slide 9

Slide 9 text

 In U.S. English time is written differently from U.K.: 5:26 AM vs 5:26 am. Notice the lowercase letters. 5:26 AM

Slide 10

Slide 10 text

INTERNATIONALIZING OUR APPLICATIONS  10 Formatting time 5:26 PM - 5:26 下午 ✘  Something like “hh:mm A”, right? For Chinese this just does not work!

Slide 11

Slide 11 text

INTERNATIONALIZING OUR APPLICATIONS  11 Formatting time 5:26 PM - 下午5:26 ✓ Lets fix this “Ahh:mm”. Are there any easier ways, but if statements?

Slide 12

Slide 12 text

SLOVENIA  What about our beloved country?

Slide 13

Slide 13 text

INTERNATIONALIZING OUR APPLICATIONS  13 Slovenski pravopis - člen 255. “Neskladenjska raba pike: Med deli številk, da ločijo enote različnih stopenj (npr. ure od minut, tolarje od stotinov, včasih tudi tisočice od nižjih enot) ali kot znamenje množenja.” Does it seem weird?

Slide 14

Slide 14 text

INTERNATIONALIZING OUR APPLICATIONS  14 5:26 PM - 17:26 PM ✘  Formatting time

Slide 15

Slide 15 text

INTERNATIONALIZING OUR APPLICATIONS  15 5:26 PM - 17.26 ✓ Formatting time

Slide 16

Slide 16 text

DATES  Things are quite interesting with displaying time. Are dates any different?

Slide 17

Slide 17 text

NO!

Slide 18

Slide 18 text

INTERNATIONALIZING OUR APPLICATIONS  18 June 3rd - 六⽉月 3rd ✘  Formatting dates Translated back from Chinese this means: Six 3rd month

Slide 19

Slide 19 text

INTERNATIONALIZING OUR APPLICATIONS  19 June 3rd - 6⽉月3⽇日 ✓ Formatting dates

Slide 20

Slide 20 text

INTERNATIONALIZING OUR APPLICATIONS  20 Formatting dates 2014年6⽉月3⽇日 ✓ Now lets try the other way around. In Chinese: then becomes in U.S. English: 2014June3 ✘

Slide 21

Slide 21 text

INTERNATIONALIZING OUR APPLICATIONS  21 Formatting dates June 3, 2014 ✓ But what we actually want to display:

Slide 22

Slide 22 text

INTERNATIONALIZING OUR APPLICATIONS  So, what can we do? 22 Locale Date Time English (U.S.) Jun 3, 2014 10:14 AM English (U.K.) Jun 3, 2014 10:14 am French (France) juin 3, 2014 10:14 AM Chinese (China) 6⽉月 3, 2014 10:14 上午 Do not use hardcoded format strings (“MMM d, y h:mm a” - in this example).

Slide 23

Slide 23 text

INTERNATIONALIZING OUR APPLICATIONS  So, what can we do? 23 Locale Date Time English (U.S.) Jun 3, 2014 10:14 AM English (U.K.) 3 Jun 2014 10:14 French (France) 3 juin 2014 10:14 Chinese (China) 2014年6⽉月3⽇日 上午10:14 Use correct date or time style formatters that output correct format based on configured locale.

Slide 24

Slide 24 text

DURATION  What if we want to display a specific time interval? The problem becomes even more complex!

Slide 25

Slide 25 text

INTERNATIONALIZING OUR APPLICATIONS  Duration, wait, what? 25 U.S. English French Chinese One hour, fifty minutes Une heure et cinquante minutes ⼀一⼩小时五⼗十分钟 1 hour, 50 minutes 1 heure et 50 minutes 1⼩小时50分钟 1:50 1:50 1:50 About 2 hours Environ 2 heures 约2⼩小时 In certain cases, we must display time as a duration, not explicit date and time.

Slide 26

Slide 26 text

INTERNATIONALIZING OUR APPLICATIONS  Duration, wait, what? 26 U.S. English French Chinese June 2 - 6, 2014 2-6 juin 2014 2014年6⽉月2⽇日⾄至6⽇日 9:00 AM - 4:30 PM 9:00 - 16:30 上午9:00 - 下午4:30 June 2, 9:00 AM - June 6, 4:30 PM 2 juin 9:00 - 6 juin 16:30 6⽉月2⽇日 上午9:00 - 6⽉月6⽇日 下午4:30 June 3, 9:00 - 10:00 AM 3 juin 9:00 - 10:00 6⽉月3⽇日 上午9:00⾄至10:00

Slide 27

Slide 27 text

NAMES h I bet nobody of you ever thought about formatting names. We just assume everyone has first and last name.

Slide 28

Slide 28 text

INTERNATIONALIZING OUR APPLICATIONS  28 Formatting names print (first_name + " " + last_name) ✓ This is the code we usually use to print someones name: Which is fine for English: Barack Obama ✓

Slide 29

Slide 29 text

INTERNATIONALIZING OUR APPLICATIONS  29 Formatting names 黛⽟玉林 ✓ Because in Chinese, there are no spaces… However, does not work for Chinese: 黛⽟玉 林 ✘

Slide 30

Slide 30 text

UNITS g Many applications are working with at least 1 kind of unit. It can be either currency, energy, length, mass, or something else.

Slide 31

Slide 31 text

INTERNATIONALIZING OUR APPLICATIONS  Energy, length, mass 31 U.S. English French Chinese 234 Cal 980 kJ 980 千焦 26.2 miles 42,2 kilomètres 42.2公⾥里 128 lb 58 kg 58千克 74°F 23°C 23°C Various quantities are displayed differently in different regions.

Slide 32

Slide 32 text

INTERNATIONALIZING OUR APPLICATIONS  Currency 32 English French Chinese Chinese Yuan yuan renminbi chinois ⼈人民币 Pound Sterling livre sterling 英镑 Japanese Yen Yen japonais ⽇日元 Formatting currency needs a special attention, as it depends on both language and locale!

Slide 33

Slide 33 text

WHAT ELSE? u Sometimes we miss some things when localizing, we are not even aware that they are different in another culture.

Slide 34

Slide 34 text

INTERNATIONALIZING OUR APPLICATIONS  Quotes 34 U.S. English French Japanese “ ” « » 「」

Slide 35

Slide 35 text

INTERNATIONALIZING OUR APPLICATIONS  35 k Right-to-left Text  Lunar, Buddhist Calendar  Different Keyboards Languages such as Arabic are written right-to-left. Need to understand the context of this, so all labels are correctly placed on canvas. There are many types of calendar available, not everyone may use the Gregorian calendar. Must ensure all calendars are supported. On mobile devices, languages and locales can have different on-screen keyboards, especially with glyph languages such as Japanese.  Does not end here…

Slide 36

Slide 36 text

SUMMARY  Lets review what have we learned.

Slide 37

Slide 37 text

INTERNATIONALIZING OUR APPLICATIONS  Region Locale 37 Internationalization must be thought of in the beginning. 1 2 Formatting properly represents a hard problem for developers. 3 Careful with dates, times, units, names and text alignment. 4 Why can’t we all just speak the same language? :( Formatting Language v   k Summary

Slide 38

Slide 38 text

Thank you!