Internationalisering och lokalisering

gtkmm-program kan lätt stödja flera språk, inklusive icke-europeiska språk som kinesiska och höger-till-vänster-språk som arabiska. Ett korrekt skrivet och översatt gtkmm-program kommer använda lämpligt språk vid körning beroende på användarens miljö.

Du kanske inte förutser något behov av att stödja ytterligare språk, men du kan aldrig utesluta det. Det är även lättare att utveckla programmet korrekt till att börja med än att skriva om det senare.

The process of writing source code that allows for translation is called internationalization, often abbreviated to i18n. The Localization process, sometimes abbreviated as l10n, provides translated text for other languages, based on that source code.

The main activity in the internationalization process is finding strings seen by users and marking them for translation. You do not need to do it all at once - if you set up the necessary project infrastructure correctly then your application will work normally regardless of how many strings you've covered.

String literals should be typed in the source code in English, but surrounded by a macro. The gettext (or intltool) utility can then extract the marked strings for translation, and substitute the translated text at runtime.