"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do."

-- unsure; often attributed without source to information philosopher Ted Nelson

Software development

Software development guidelines by Ken Gaillot

Native language support

Native language support (NLS) is the capability of a software package to interact in the user's native language.

NLS generally includes two parts: internationalization is enabling a program to support translations, and localization is providing a translation for a specific language. Internationalization is often abbreviated "i18n" and localization "l10n" (the first and last letters, with the number of letters in between!).

With NLS, the programmer writes messages in one language, typically U.S. English. Later, translations of those messages can be provided for other languages. When the program is started, it loads whichever translation the user requests.

True NLS is very difficult to implement. Not only must output messages be translated, but also documentation. Local variations in things such as displaying dates, numbers and currency values must be taken into account. Even input files and command-line arguments should be translated. Unfortunately, NLS support tools are in an infant stage.

A locale is a formal description of a particular set of cultural habits, such as language, character encoding, and how to display dates, together with all translations for the particular language.

Wide characters

Traditionally, programmers have used the ASCII character set for text. As software has gone global, ASCII has proven insufficient to handle native language support. In response, international standards bodies have specified a standard variously known as ISO 10646, UCS and Unicode, which can encode the characters of every modern and historical human language.

The major difference between ASCII and Unicode is that each ASCII character is encoded with one byte (8 bits), while Unicode characters are encoded with one to four bytes. In a programming context, bigger-than-ASCII characters are often called "wide characters."

Unicode support is just starting to catch on, so availability is patchy and support tools vary. Generally, operating systems and GUI toolkits are working to support Unicode with minimal changes to applications.

Modern C/C++ libraries implement wide character support with the wchar_t type and wide-character equivalents of standard text functions. If you wish to enable Unicode support in your package, see the links in the Tools section.

gettext

The GNU gettext C library provides basic NLS, allowing a program's text messages to be translated. It cannot help with translating documentation and other aspects of NLS, but at least the user interface components can be translated. It is an easy way to add basic NLS to a program. gettext is licensed with the GPL, not the LGPL, so any programs using it must also be GPL'ed if they are distributed. (Some systems, notably Sun, provide their own version of gettext which are licensed differently. Also, some other systems provide a similar but more difficult system called catgets.)

gettext is intended to be used in conjunction with the autoconf/automake OS portability tools, and will not easily work without them. The programmer should modify the autoconf configuration files in the top-level package directory as follows:

Once you've set up autoconf and automake to work with gettext, create the gettext support files:

To use gettext, the programmer should:

See the gettext documentation for details on providing translation files for other languages.


Security

(TO DO)

Tools