NAME
Locale::TextDomain::OO::Singleton::Lexicon - Provides singleton lexicon access
$Id: Lexicon.pm 466 2014-01-20 15:45:11Z steffenw $
$HeadURL: svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Singleton/Lexicon.pm $
VERSION
1.007
DESCRIPTION
This module provides the singleton lexicon access for Locale::TextDomain:OO.
SYNOPSIS
use Locale::TextDomain::OO::Singleton::Lexicon;
$lexicon_data = Locale::TextDomain::OO::Singleton::Lexicon->instance->data;
SUBROUTINES/METHODS
method data
Get back the lexicon hash reference to fill the lexicon or to read from lexicon.
$lexicon_data = Locale::TextDomain::OO::Singleton::Lexicon->instance->data;
method merge_lexicon
Merge ist mostly used to join data of a language to create data for a region with some region different data.
$instance->merge_lexicon('de::', 'de-at::', 'de-at::');
method move_lexicon
Move is typical used to move the "i-default::" lexicon into your domain and category. With that lexicon without messages you are able to translate because the header with plural forms is set. With no lexicon you would get a missing "plural forms"-error during translation.
$deleted_lexicon = $instance->move_lexicon(
'i-default::',
'i-default:LC_MESSAGES:domain',
);
method delete_lexicon
Delete a lexicon from data.
$deleted_lexicon = $instance->delete_lexicon('de::');
EXAMPLE
Inside of this distribution is a directory named example. Run this *.pl files.
DIAGNOSTICS
confess
CONFIGURATION AND ENVIRONMENT
none
DEPENDENCIES
Locale::TextDomain::OO::Lexicon::Role::Constants
INCOMPATIBILITIES
not known
BUGS AND LIMITATIONS
none
SEE ALSO
AUTHOR
Steffen Winkler
LICENSE AND COPYRIGHT
Copyright (c) 2013 - 2014, Steffen Winkler <steffenw at cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.