Ruby-GetText-Package

Ruby-GetText-Package is a Localization(L10n) library and tool

which is modeled after the GNU gettext package.

This library translates original messages to localized

messages using client-side locale information(environment

variable or CGI variable).

The tools for developers support creating, useing, and modifying

localized message files(message catalogs).

((Rails)) Rails support has been removed.

Rails / ActiveRecord specific code now lives in gettext_rails and gettext_activerecord.

Website

Features

Requirements

Install

You can also install files in your favorite directory by

supplying setup.rb some options. Try ruby setup.rb --help.

Usage

Translation

The gettext methods comes in 3 combinable flavors

Locale / Domain

GetText stores the locale your are using

GetText.locale = "en_US" # translate into english from now on
GetText.locale # => en_US

Or

include GetText
set_locale "en_US"

Each locale can have different sets of translations (text domains) (e.g. Financial terms + Human-resource terms)

GetText.bindtextdomain('financial')

Or

include GetText
bindtextdomain('financial')

For more details and options, have a look at the samples folder or consult the tutorial.

License

This program is licenced under the same licence as Ruby.

(See the file 'COPYING'.)

Translators

Status of translations

Maintainer

Masao Mutoh <mutoh at highway.ne.jp>