devxlogo

Rules of Thumb for Software Internationalization

Rules of Thumb for Software Internationalization

Internationalized software must enable easy porting to other locales. A locale defines language and specific cultural conventions. The process of adjusting internationalized software to a particular locale is called localization (a common acronym for this term is L10N). You can think of software internationalization as a prerequisite for localization. Localization consists of more than just translating the user interface. Consider North America and Britain, for instance. Seemingly, they use the same language. However, not only do these locales differ in spelling (program vs. programme, realize vs. realise, color vs. colour etc.), certain cultural conventions such date formatting (in Europe the date format is DDMMYYY whereas in north America it’s MMDDYYYY), currency, and measurement system. Other locales exhibit additional cultural differences. In Germany and other European countries, the sign of a decimal fraction (also called radix) is a comma, e.g., 10,5. In North America, the radix is called “decimal point”, and as the name suggests, it’s represented as follows: 10.5.

Locales use different character codesets (7-bit ASCII, EBCDIC, Unicode) and fonts (Latin, Hebrew, Cyrillic). There are a few basic guidelines to follow in order to ensure easy software localization:

  • Avoid any hard code literal text in your code. Instead, use string tables or environment variables.
  • Use wide characters instead of narrow characters. C and C++ support the wchar_t datatype. C++ also provides the wstring class. Use these types instead of char and string.
  • Compose decimal numbers and dates from dynamic lexical units. Such lexical units are strings that contain a locale-specific representation of a fraction sign, currency symbol, and date format separators.
  • Don’t assume anything about text directionality. Semitic languages such as Arabic and Hebrew are written right-to-left, as opposed to European languages. Consequently, menus, frames and pages are aligned differently in such languages. Some Asian languages are written bottom-up.
  • Be ready to deal with several calendars. Other calendars such as the Muslim, Chinese and Hebrew calendars may be used in addition to the Gregorian calendar in certain locales.
  • Avoid any assumption about religious matters and holidays. For example, in non-Christian countries, December 25 is usually an ordinary business day and so is Sunday. An internationalized banking system should be ready to process transactions from foreign branches on Sunday, for example.
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist