gettext - gettext for Ruby

HELP US: Please fix markup of this file. This file's markup is
migrated from RDoc format. But some RDoc markups still exist.

NOTE: Gettext gem 3.0.0 removed many deprecated APIs and improves
internal APIs. We want to keep backward compatibility as much as
possible but some existing codes may be broken by gettext gem API
change. If your code breaks by gettext gem 3.0.0, please report your
problem. We will fix the problem and release a new version.

_(fruit) cannot be understood by the gettext parser. To help the parser find all your translations,
you can add fruit = N_("Apple") which does not translate, but tells the parser: "Apple" needs translation.

fruit=N_("Apple")# same as fruit = "Apple"
_(fruit)# does a normal translation
fruits=Nn_("Apple","%{num} Apples")n_(fruits,3)

Bind textdomains to the classes.

A textdomain has a translation file in each language.
A module/class can have multi textdomains. This means the
libraries/applications can have their own textdomains.