Download presentation
Presentation is loading. Please wait.
Published byKerrie Powers Modified over 9 years ago
1
i18n = g11n + L10n Adam Long & Sam Soubra QSR International March 2009
2
i18n = g11n + L10n What does the abbreviation stand for – Internationalization = Globalization + Localization Or – According to Microsoft
3
About QSR International Established in 1995 Independent software vendor based in Melbourne, Australia 90% of revenue from exports 400,000 customers in 90 countries Governor of Victoria Export Award for ICT, Winner 2006 & 2008 Microsoft Gold Partner
4
About QSR International Products 2006 g11n 2007 Japanese L10n 2008 Chinese, Spanish L10n 2009 French, German L10n
5
Why develop software for the global marketplace? Australia represents 1% of the global software market Increase revenue potential Servicing a larger market is more cost- effective and efficient Leverage development costs Consumers and businesses operate across international borders Increase customer satisfaction Gain competitive advantage and be the leader in your industry Leadership
6
World Population (Source: Wikipedia) 0.3%
7
World Language Speakers (millions) (Source: KryssTal 2006)
8
World Nominal GDP (billions USD) (Source: World Bank 2007)
9
Globalization (g11n) g11n is the process of developing software whose features and code design are not solely based on a single language or locale. It involves: Alphabets/scriptsDate/time formats, calendarsFormatting of numbersWriting directionTime zonesCurrencyPaper sizes
10
Localization (L10n) L10n is the process of adapting software for a specific region or language. It involves: Language translationLocal contentCultural valuesAesthetics
11
L10n of NVivo in Spanish
12
L10n of NVivo in Chinese
13
g11n Code Recommendations CurrentUICulture Automatically set by.NET based on user’s Windows settings Thread.CurrentUICulture can get/set System.Globalization.CultureInfo CultureInfo defines a culture, ISO definition, e.g. “en-US”, “en-GB”, “ja-JP” Unicode System.String has useful methods such as ToUpper(), ToLower() System.Char has useful methods such as IsLetter(), IsPunctuation() Beware that Text files may require handling of different encodings (e.g. Unicode, UTF8, Western European Windows) using System.Text.EncodingInfo String Comparisons Always pass Culture.CompareInfo as a parameter when using String.Compare(), String.CompareTo(), String.ToUpper() and String.ToLower() E.g. Turkish has four i’s => İ & i, plus I & ı.
14
g11n Code Recommendations Date and Time System.DateTime Class provides support for universal and local date times Store date and time data in universal time Display local date and time to user Formatting Numeric and DateTime values should be formatted according to CurrentUICulture e.g. 31/12/2009 (en-GB) vs. 12/31/2009 (en-US) e.g. 123,456.78 (en-AU) vs. 123.456,78 (de-DE) Paper Size Use Default Printer settings, i.e. do not rely on the user having A4 paper File System Use SHGetKnownFolderPath() rather than hard-coded paths for folders such as MyDocuments Use Security ID rather than System Resource Name, e.g. “NT AUTHORITY\Network Service” may be named differently on different language versions of Windows
15
g11n Database Recommendations Collation Use Binary collation (_BIN or _BIN2) suffix when installing database to ensure comparisons (WHERE, GROUP BY, SORT BY) are evaluated correctly Data Types Use Unicode data types NCHAR, NVARCHAR, NTEXT rather than CHAR, VARCHAR, TEXT
16
.Net Framework Namespace System.Globalization Provides National Language Support Date and time formatting String comparison and sorting Numeric formatting Calendars etc System.Text Unicode used internally Conversion from code pages through Encoding classes System.Resources RESX files containing culture specific resources Localized satellite assemblies
17
CultureInfo Class The CultureInfo class provides all the basic functionality for changing the encoding format, which in turn controls structures such as the language, writing systems and calendar used by a particular culture. In particular, the CultureInfo class maintains the values for CurrentCulture and CurrentUICulture. CurrentCulture indicates the encoding culture used for locale- dependent formatting such as with dates. CurrentUICulture indicates the encoding culture used for resource lookups
18
CultureInfo Class Every locale is identified by a culture, using the format: Language code: A two-letter lowercase for a language. Eg. “en”, “ar”, “zh” Country/Region code: A two-letter uppercase for a country or a region. Eg. “AU”, “LB”, “CN” Cultures are of two types: Neutral culture: A culture that is linked only to a language and not to a country. Eg. “ru” is a neutral code. Specific culture: A culture that is linked to both a country and a language. Eg. “ru-RU” is a specific code. - “en-AU”, “en-US”, “es-MX”, “zh-CN” - “en-AU”, “en-US”, “es-MX”, “zh-CN”
19
Comparing and Sorting Data Different cultures use different alphabetical orders to sort strings and different cultures also compare strings differently. The culture aware.NET Framework will handle most situations automatically via the following features: The String.Compare method compares strings The CultureInfo.CompareInfo object can search for substrings The Array.Sort method sorts the members of an array by the alphabetical order rules The SortKey.Compare method also compares strings All according to the rules of the CultureInfo referenced by the CurrentCulture property.
20
g11n Code Demo
21
L10n Code Recommendations Application Localize all text labels that are displayed to the user Allow the user to change the display font Forms & Controls Set the “localizable” property to True Allow 40% more space for labels than in English Messages & Strings Never hard-code, store as a resource Avoid string concatenation, i.e. use parameterized resource strings Icons & Graphics Avoid text and cultural connotations to minimize translation costs
22
Resource Files The most straightforward method of dealing with localizable resources is to put everything in some type of resource repository like Windows resource files and.NET assemblies Resource repositories tend to be easy to edit, and they eliminate the need for recompiling source code
23
Resource Generation.resx file XML based file containing descriptions of resources.resources file ResGen tool compiles.resx files into binary files containing resources.resources.dll – satellite assembly The.resources file is embedded into an assembly using either the assembly linker tool or language compiler
24
Satellite Assemblies Culture-Specific Subdirectories LocalizedApp.Resources.dll LocalizedApp.Resources.dll LocalizedApp.Resources.dll LocalizedApp.exeLocalizedApp.exe ResourcesResources \en-US \es \es-MX Main Assembly Application Directory Code Types Form1Form2 Form1 Form1 Form1 Control1 Form2 Form2 Form2 Control1 Control1 Control1
25
Localizable Property Localizable = False (default) this.button1.TabIndex = 0; this.button1.Text = "button1"; Localizable = True this.button1.TabIndex = ((int)(resources.GetObject("button1.TabIndex"))); this.button1.Text = resources.GetString("button1.Text");
26
Locating Resources First, attempt to find the resource in current thread’s UI culture en-AU Then try the neutral parent culture en Finally use the default resource from main assembly (otherwise throw exception) en-AUen-AU en-USen-US enen (default)(default)
27
L10n Code Demo
28
L10n Quality Assurance Recommendations Viewing context/usage is important when translating and reviewing Use a specialist software translatorUse a native speaking reviewer with domain expertise Test on different language operating systems
29
L10n General Recommendations Planning Plan for additional Effort, Lead-time and Coordination Review 3 rd Party Components Ensure they support g11n and L10n Consider what needs to be translated Application User assistance materials Marketing materials Support materials End User License Agreement (legal issues in translation)
30
Why good translations are important Pepsi used "Come alive with the Pepsi Generation" campaign successfully in the Western World In Taiwan, however, it came out as "Pepsi will bring your ancestors back from the dead"
31
Why good translations are important In the late '70s, the American computer company Wang was puzzled why its British branch refused to use its latest motto "Wang Cares". To British ears the motto sounded too close to "wankers".
32
Resources This Presentation – http://chieftechnologyofficer.wordpress.com Globalization Step-by-Step – http://msdn.microsoft.com/en-au/goglobal/bb688110.aspx Internationalize Your ASP.NET Applications – http://www.devx.com/dotnet/Article/6997 MultiLingual Guides – https://www.multilingual.com/guides.php
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.