Catmandu::Fix::i18n(3pm)

Catmandu::Fix::i18n3pm

Lookup value in i18n

Usage

    use Catmandu::Sane;
    use Catmandu;
    #In your catmandu config
    Catmandu->config->{i18n} = {
        en => [
          "Gettext",
          "/path/to/en.po"
        ],
        nl => [
          "Gettext",
          "/path/to/nl.po"
        ]
    };
    #In your fix
    #simple lookup
    i18n( "title", config => "i18n", lang => "en" )
    #lookup with arguments
    add_field("args.$append","Nicolas")
    i18n( "greeting", config => "i18n", lang => "en", args => "args" )

Constructor arguments

path

* path to i18n key

* specified as fix argument

* required

config

* path to i18n configuration in the Catmandu config

* specified as fix option

* required

lang

* language to use

* specified as fix option

* required

args

* path in current record where arguments are stored. Must be an array.

* specified as fix option

* optional

Releases

Unchanged in 2 releases since Debian 12 (Bookworm).

  1. 12–13

Authors

Nicolas Franck "<nicolas.franck at ugent.be>"

From libcatmandu-i18n-perl 0.01-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.