Stevan Little > Data-Localize-Storage-MongoDB-0.001 > Data::Localize::Storage::MongoDB

Download:
Data-Localize-Storage-MongoDB-0.001.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Data::Localize::Storage::MongoDB - A MongoDB storage backend for Data::Localize

VERSION ^

version 0.001

SYNOPSIS ^

  use Data::Localize::Storage::MongoDB;

  my $conn =  MongoDB::Connection->new( host => 'localhost' );

  my $loc = Data::Localize->new;
  $loc->add_localizer(
      class         => 'Gettext',
      path          => 't/001-basic/*.po',
      storage_class => 'MongoDB',
      storage_args  => {
          database => $conn->get_database('i18n')
      }
  );

  $loc->set_languages('ja');
  print $loc->localize('Hello, stranger!', '牧大輔');

  $loc->set_languages('en');
  print $loc->localize_for('Hello, stranger!', 'Stevan');

DESCRIPTION ^

This is a simple MongoDB storage backend for Data::Localize.

METHODS ^

get

This is used internally by Data::Localize.

set

This is used internally by Data::Localize.

AUTHOR ^

Stevan Little <stevan.little@iinteractive.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2011 by Infinity Interactive, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: