from:  Internationalization_and_localization

Coding practice

The current prevailing practice is for applications to place text in resource strings which are loaded during program execution as needed. These strings, stored in resource files, are relatively easy to translate. Programs are often built to reference resource libraries depending on the selected locale data. One software library that aids this is gettext.

Thus to get an application to support multiple languages one would design the application to select the relevant language resource file at runtime. Resource files are translated to the required languages. This method tends to be application-specific and, at best, vendor-specific. The code required to manage date entry verification and many other locale-sensitive data types also must support differing locale requirements. Modern development systems and operating systems include sophisticated libraries for international support of these types.

Video on the internationalization process:   Lingoport's Globalyzer   Is a tool that helps with internationalization.  This video shows what they are watching in order to be sensitive to function format, exceptions etc.  It is useful to watch even if you are not going to use them.


How to Translate With GetText PO and POT Files    These are standardized for use with Poedit   wikipedia: Poedit   ( Poedit was developed with WxWidgets – a cross platform GUI C libraries )

  • POT – Portable Object Template. This is the file that you get when you extract texts from the application. Normally, you send this file to your translators.
  • PO – Portable Object. This is the file that you receive back from the translators. It’s a text file that includes the original texts and the translations.
  • MO – Machine Object. The MO file includes the exact same contents as PO file. The two files differ in their format. While a PO file is a text file and is easy for humans to read, MO files are compiled and are easy for computers to read. Your web server will use the MO file to display the translations.

How drupal project manages group translation effort

Example of a drupal .PO file and how to work offline with them   – note how they have a set of escape characters to prevent translation of certain select strings that are variables

Outline of Language internationalization process

  • xgettext  gets all the strings in the code that need translated.    .pot file is produced.
  • gettext  is the function that is analogous to my "translate" function that is used in code to get the translated string


VB6 Localization   — The following approach would get very heavy as a project gets larger.  It refers to resource strings with integers and with a large program you would be stuck with bouncing back and forth between resource editor and your code

Leave a Reply

Your email address will not be published. Required fields are marked *