P00471 Software Production Internationalisation

advertisement
School of Technology
P00471 Software Production
Internationalisation
David Lightfoot
1
Spelling
• Internationalisation (United Kingdom)
• Internationalization (America)
• I18N – get it?
School of Technology
2
International Standards
•
•
International Standards Organization (ISO)
www.iso.org
School of Technology
3
National Standards bodies
•
•
•
•
•
•
British Standards Institute – BSI
Association française de normalisation – afnor
Deutsches Institut für Normung e. V. – DIN
American National Standards Institute – ANSI
European Committee for Standardization / Europäisches Komitee für
Normung / Comité Européen de Normalisation – CEN
…
School of Technology
4
International standards in computing
Many programming languages have official standards:
• ANSI C (ISO C)
• BSI Pascal
• ISO Modula-2
• …
Very important for portability and for being sure of meaning of programs.
de facto standards – unofficial, but everybody uses them
School of Technology
5
Culturally Dependent Data
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Messages
Labels on GUI component
Online help
Sounds
Color (sic)
Graphics
Icons
Date
Times
Numbers
Currencies
Measurements
Phone numbers
Honorifics and personal titles
Postal addresses
Page layouts
From java.sun.com/docs/books/tutorial/i18n/
School of Technology
6
Messages, Labels on GUI components, Online help,
sounds
6170 languages in world
375 million people speak English as second language
Second most spoken language in world
Countries in which English is spoken as first language by a majority of the
population:
• Antigua, Australia, Bahamas, Barbados, Belize, Bermuda, Canada,
Dominica, Grenada, Guyana, Ireland, Jamaica, New Zealand,
St Christopher and Nevis, St Lucia, St Vincent, South Africa, Trinidad
and Tobago, United Kingdom, United States of America
School of Technology
7
English is officially spoken in:
•
Anguilla, Antigua, Bahamas, Barbados, Belau, Bermuda, Botswana,
British Indian Ocean Territory, British Virgin Islands, American Samoa,
Antigua, Australia, Bahamas, Bangladesh, Barbados, Belize, Bermuda,
Bhutan, Botswana, British Virgin Islands, Brunei, Cameroon, Cook
Islands, Dominica, Ethiopia, Falkland Islands, Fiji, Gambia, Ghana,
Gibraltar, Grenada, Guam, Guyana, Hong Kong, India, Ireland,
Jamaica, Jersey, Kenya, Kiribati, Lesotho, Liberia, Malawi, Malaysia,
Malta, Marshall Islands, Mauritius, Micronesia, Midway Islands,
Montserrat, Namibia, Nauru, Nepal, New Zealand, Nigeria, Niue,
Norfolk Island, Pakistan, Palau, Papua New Guinea, Philippines,
Pitcairn, Puerto Rico, Samoa, Seychelles, Sierra Leone, Solomon
Islands, Somalia, Sri Lanka, St Helena, St Kitts-Nevis, St Lucia,
St Vincent and the Grenadines, Swaziland, Tokelau, Tonga, Trinidad
and Tobago, Tuvalu, US Virgin Islands, Uganda, United Kingdom,
United States, Vanuatu, Wake Island, Western Samoa, Zambia,
Zambia, Zimbabwe
School of Technology
8
English – degree of use
•
•
•
It is claimed that one out of every five people on earth can speak
English to some level of competence. (English.com)
More than 80% of home pages on the Web are in English, while the
next greatest, German, has only 4.5% and Japanese 3.1%.
Proportion of email in English: between 60% and 85%.
School of Technology
9
Languages: number of speakers
• Mandarin Chinese (837,000,000)
• English (370,000,000)
• Spanish (300,000,000)
• Bengali (189,000,000)
• Hindi/Urdu (182,000,000)
• Arabic (174,950,000)
• Portuguese (170,000,000)
• Russian (170,000,000)
• Japanese (125,000,000)
• German (98,000,000)
• Javanese (79,000,000)
• French (75,000,000)
English.com
School of Technology
10
Not speak English
•
•
English.com claims that about one fifth of population of planet can
speak English.
Generous estimate – probably fewer.
•
•
So, more than 80% of world population do not speak English!
Why should they?
•
Moral: we'd better be able to internationalise our products!
School of Technology
11
Colour
•
Colours do not have the same significance in all cultures:
•
Example: in United Kingdom
• Black – death
• White – purity
• Red – danger
• …
Japan
• White – death
• …
•
School of Technology
12
Icons
• Icon language standardised
(ISO) to some extent, but
check for cultural differences
ISO hazard symbols
School of Technology
13
Dates
Millennium (Y2K) problem
Luckily world did not end! But it was a big problem – we did not
use enough digits for year.
Dates are ambiguous:
When was 9/11/2001?
Leads to genuine confusion and error.
Problems with dates did not go away after millennium
Got worse!: when is (was) 4/5/6?
At least in the last millennium we knew which bit was the year
(well after 1931 we did)
School of Technology
14
ISO Date
ISO date format:
yyyy–mm–dd
examples:
2006–11–23
2001–09–11
Advantages
• In right order: big unit first
• Can't be confused with other date format
• Sorts correctly as string
• Matches Chinese date order
School of Technology
15
Time
•
24-hour clock or 12-hour clock
12-hour clock used in:
• Albania
• United States, Canada (not Québec), South Africa, Zimbabwe,
Australia, New Zealand, Philippines, Belize, Trinidad, Jamaica,
Caribbean but not United Kingdom (official)
• Greece
• Mexico, parts of South America
• East Africa
24-hour clock used:
• almost everywhere else (for official purposes)
School of Technology
16
Time zones
•
•
•
•
USA – 10 times zones
China – one time zone
Zulu time (or Z time, is UTC)
UTC – Universal Time Coordinated, formerly called Greenwich Mean
Time (GMT)
•
British secret service always works on Zulu time (source: Agent
Clocksin – Professor William Clocksin), as does diplomatic service
Shipping uses Zulu time.
•
School of Technology
17
Problems with times (midnight, 12-hour clock)
•
‘Hand in time 12:00pm’ (midday, midnight?)
•
US Greyhound long-distance bus timetables: boldface for pm; hard to
distinguish on a photocopy or fax.
So when does the bus from New York to Los Angeles arrive at Boulder
Colorado? 10:15 or 10:15
•
•
•
•
•
•
Television listings in UK require 'backtracking' (and day runs from 6am
to 6am)
USA uses 12-hour clock even for times of flights!
USA military uses 24-hour ('military') time.
What day does midnight belong to?
'Hostilities will end officially at one minute after midnight to-night'
Tuesday, May 8 1945 Winston Churchill
School of Technology
18
ISO Time
ISO time format: 24-hour clock
hh:ss
or
hh:ss:cc
examples:
09:30
23:59:59
Advantages
• Easy to do calculations
• No confusion over am or pm
• Sorts correctly as string
School of Technology
19
GetDate, GetTime: problem
What is wrong with:
…
GetDate(year, month, day);
GetTime(hour, minute);
…?
School of Technology
20
GetDate, GetTime: answer
What is wrong with:
…
GetDate(year, month, day);
GetTime(hour, minute);
…?
Answer: if used close to midnight can get out by one day!
GetDate called before midnight
GetTime called after midnight
Wrong day!
School of Technology
21
ISO Date and Time
yyyy–mm–dd hh:ss
or
yyyy–mm–ddThh:ss
Possibly with time zone appended:
2006–11–23T09:59UTC+00
School of Technology
22
Numbers
•
•
•
•
Decimal (radix) separator
Dot 123.45
or
Comma 123,45
•
•
•
•
•
Grouping separator
1,000,000.99 (UK)
1'000'000,99 (Switzerland)
1.000.000,99
1 000 000,99 (
•
ISO standard – no grouping character
School of Technology
23
Numbers: Dot countries
Countries where a dot is used to mark the radix point include:
•
Australia, Brunei, Botswana, Canada (English-speaking), China,
Dominican Republic, El Salvador, Guatemala, Honduras, Hong Kong of
the People's Republic of China, India, Ireland, Israel, Japan, Korea
(both North and South), Malaysia, Mexico, New Zealand, Nicaragua,
Nigeria, Pakistan, Panama, Philippines, Peru, Singapore, Sri Lanka,
Taiwan, Thailand, United Kingdom, United States (including insular
areas)
School of Technology
24
Numbers: Comma countries
Countries where a comma is used to mark the radix point include:
• Albania, Andorra, Argentina, Austria, Azerbaijan, Belarus, Belgium,
Bolivia, Bosnia and Herzegovina, Brazil, Bulgaria, Cameroon, Canada
(French-speaking), Costa Rica, Croatia, Cuba, Chile, Colombia,
Cyprus, Czech Republic, Denmark, Ecuador, Estonia, Faeroes,
Finland, France, Germany, Greece, Greenland, Hungary, Indonesia,
Iceland, Italy, Latvia, Lithuania, Luxembourg (uses both separators
officially), Macedonia, Moldova, Netherlands, Norway, Paraguay,
Poland, Portugal, Romania, Russia, Serbia, Slovakia, Slovenia, South
Africa, Spain, Sweden, Switzerland, Turkey, Ukraine, Uruguay,
Venezuela, Vietnam, Zimbabwe
School of Technology
25
Currencies
•
•
•
•
Some countries use units of currency that lead to very big numbers:
Pre-euro:
• 'Looks a million lire' (Lira was Italian unit of currency, symbol £)
• £1 = 1800 Lire, so about £500
Consider conversion rate
Check for currency symbols in typeface:
• £
• $
• ¥
• €
• ₧
• …
School of Technology
26
Measurements
•
•
SI, Système International d'Unités (metric
system)
Used in all countries of world, apart from:
• United States
• United Kingdom (partial use: a right old
mess)
the Bill for a compulsory change to the metric
system (in United Kingdom) was approved
on1st July 1863
•
About 95% of people on the planet live in metric
countries
•
www.metric.org.uk
School of Technology
27
Problems with measurements
• In 1999 NASA lost a $125 million Mars Orbiter
because one engineering team used metric units
while another used English units for a key spacecraft
operation. A computer program that was supposed to
provide its output in newton seconds (N·s) but
instead provided pound-force seconds (lbf·s).
• Aircraft altitudes are in feet throughout the world,
except for China, Mongolia, and the CIS (former
Soviet states), which use metres.
School of Technology
28
'System'
School of Technology
29
Phone numbers
•
Americans use # sign
• Area code
• Local number
•
There is an international format for phone numbers:
• Access code – 00 (or +)
• Country code – 44 (United Kingdom)
• Area code – 1865 (Oxford)
• Local number 484539
• So +44 1865 484539
•
•
In France digits written in pairs and pronounced as two-digit number:
48 45 39 ('quarante-huit, quarante-cinq, trente-neuf')
School of Technology
30
Honorifics and personal titles
•
•
•
•
•
Dr
Prof
Herr Dr
Frau Dr
Herr Professor DDr (Doppel Doktor)
School of Technology
31
Postal addresses
•
British addresses are very long:
Room T223
Department of Computing
School of Technology
Oxford Brookes University
Wheatley Campus
Wheatley
Oxford
Oxfordshire
United Kingdom
OX33 1HX
•
Can't put my post-code into an ÖAMTC (Austrian) computer.
School of Technology
32
Page layouts
•
•
Writing direction – affects reading direction of web site
Left-to-right …
•
Paper sizes
• Apart from US only Canada uses US letter paper sizes
• ISO 216 Paper Sizes: A4 physics professor Georg Christoph
Lichtenberg (University of Göttingen, Germany, 1742-1799)
School of Technology
33
Collation order (not on checklist)
• Different languages put same
characters in different orders.
For example
• In German, ö comes just after o
• In Swedish, ö comes after z
• In Swedish, v and w are sorted
as the same character.
From SAS web site: Swedish version
School of Technology
34
This program is not world-ready yet!
public class NotI18N {
static public void main(String[] args) {
System.out.println("Hello.");
System.out.println("How are you?");
System.out.println("Goodbye.");
}
}
You can't ask a translator to work with program text.
We need to internationalise it – to make it world-ready.
From java.sun.com/docs/books/tutorial/i18n/
School of Technology
35
References
.NET Internationalization
The Developer's Guide to Building Global Windows and Web Applications
Guy Smith-Ferrier
Addison Wesley
School of Technology
36
Summary
•
•
•
•
Can't require customers to use English (US/UK?)
Can't leave customers to localise software
Need to think about lots of issues
Need to internationalise software: to make it world
ready.
• Modern systems (such as Java, Microsoft .NET) give
help on this.
School of Technology
37
Download