J. David Ibáñez FRANÇAIS · ENGLISH · ESPAÑOL · ČESKY · 日本語  
 

Quick start

Output the "Hello world" message in multiple languages

  1. Create a folder named, for example, TestLocalizer, and go inside it.

  2. Create a MessageCatalog named, for example, gettext.

  3. Go to the management interfaces of the message catalog, go to the tab languages and add the languages you want.

  4. Create a DTML method named test_gettext.

  5. In the DTML method type:

          <dtml-var "gettext('Hello world!')">
        
  6. View the DTML method.

  7. Go to the management screens of the message catalog, provide translations to the message "Hello world!".

  8. View again the DTML method, change the language configuration of your browser and reload the page to see how the message changes.

Add a language selection box

  1. Add a Localizer instance.

  2. Edit the DTML method test_gettext and add:

          <dtml-var "Localizer.changeLanguageForm()">
        
  3. View again the DTML method and use the selection box to change the language (you need to active cookies and javascript in your browser).

Multilingual by Localizer