Data::Localize::Namespace - Acquire Lexicons From Module %Lexicon Hash


Data-Localize documentation  | view source Contained in the Data-Localize distribution.

Index


NAME

Top

Data::Localize::Namespace - Acquire Lexicons From Module %Lexicon Hash

SYNOPSIS

Top

   package MyApp::I18N::ja;
   use strict;
   our %Lexicon = (
      "Greeting" => "[_1]さん、こんにちは!"
   );

   1;

   use Data::Localize;

   my $loc = Data::Localize::Namespace->new(
      namespace => "MyApp::I18N",
   );
   my $out = $loc->localize_for(
      lang => 'ja',
      id   => 'Greeting',
      args => [ 'John Doe' ]
   );

METHODS

Top

add_namespaces

Add a new namespace to the END of the namespace list

get_lexicon

Looks up lexicon data from given namespaces. Packages must be discoverable via Module::Pluggable::Object, with a package name like YourNamespace::lang

namespaces

Get all the namespaces that this localizer will look up, in the order that they will be looked up.

register

Registers this localizer to the Data::Localize object

AUTHOR

Top

Daisuke Maki <daisuke@endeworks.jp>

COPYRIGHT

Top


Data-Localize documentation  | view source Contained in the Data-Localize distribution.