Skip to end of metadata
Go to start of metadata

Description

Enables localization of messages using GNU Gettext. This plugin is a port of the grails i18n-gettext plugin

Installation

The current version of griffon-i18n-gettext-plugin is 0.2
To install just issue the following command

Usage

This plugin adds some methods to view instances:

  • tr(Map params, String text, Object... objects)
  • trc(String comment, String text)
  • trn(String singularText, String pluralText, Number n, Object... objects)
  • trnc(String comment, String singularText, String pluralText, Number n, Object... objects)

You just wrap your texts in one of the tr-methods. They work only with double quotes, not with single quotes, and the named parameters must be the last parameters.

Then execute

to generate the keys.pot and merge into existing po files, followed by

to create a German language file. Edit the griffon-app/i18n/de.po file. Then execute

to generate a i18ngettext.jar in your lib folder.

Source

The Sourcecode is at github.

History

Version

Date

Notes

0.2

2011-02-16

Named parameters, locale and resourcebundle can be given

0.1

2011-01-25

Initial release

  • No labels