Localization and Internationalization
- Short: l10n
- Adaptation of software to meet the language, cultural and other requirements of a specific target market (a locale)
- Examples:
- Numeric, date and time formats
- Use of currency
- Keyboard usage
- Collation and sorting
- Symbols, icons and colors
- Varying legal requirements
- Short: i18n
- Enables easy localization for target audiences that vary in culture, region, or language
- Software design and development practices
- Examples:
- Enable Unicode
- No UI constants in code
- Support for bidirectional text
- Support for non-Latin typographic features
- Support local, regional, language, or culturally related preferences
- Separating localizable elements from source code or content
- Read details in Microsoft docs
- Use Unicode internally
- C#
string
is always Unicode - In SQL Server, use
nchar
andnvarchar
- C#
- Use helper classes in
System.Globalization
- Use
Thread
's CurrentCulture and CurrentUICulture for formatting and retrieving resources - Do not assume ASCII data, use encoding classes in
System.Text
instead - Test on international operating system versions, using international data
<!--#include file="i18n-l10n/0005-basics/Calendar.csx" -->
<!--#include file="i18n-l10n/0005-basics/CultureInfo.csx" -->
- See also Formatting Types in .NET
Code walkthrough for L10n sample on GitHub