-
-
15 Mar 2019 21:49:36 UTC
- Distribution: Locale-TextDomain-OO-Util
- Module version: 4.001
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (1205 / 0 / 17)
- Kwalitee
Bus factor: 1- 96.50% Coverage
- License: perl_5
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (13.8KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Steffen Winkler <steffenw at cpan.org>
- Dependencies
- Carp
- English
- charnames
- namespace::autoclean
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- SUBROUTINES/METHODS
- EXAMPLE
- DIAGNOSTICS
- CONFIGURATION AND ENVIRONMENT
- DEPENDENCIES
- INCOMPATIBILITIES
- BUGS AND LIMITATIONS
- SEE ALSO
- AUTHOR
- LICENSE AND COPYRIGHT
NAME
Locale::TextDomain::OO::Util::JoinSplitLexiconKeys - Handle lexicon and message key
VERSION
4.001
$Id: JoinSplitLexiconKeys.pm 715 2018-06-04 15:08:31Z steffenw $
$HeadURL: svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/Locale-TextDomain-OO-Util/trunk/lib/Locale/TextDomain/OO/Util/JoinSplitLexiconKeys.pm $
SYNOPSIS
use Locale::TextDomain::OO::Util::JoinSplitLexiconKeys; my $keys_util = Locale::TextDomain::OO::Util::JoinSplitLexiconKeys->instance;
DESCRIPTION
Module to handle the lexicon and message key.
SUBROUTINES/METHODS
method instance
see SYNOPSIS
method join_lexicon_key
$lexicon_key = $keys_util->join_lexicon_key({ category => 'LC_MESSAGES', # default q{} domain => 'TextDomain', # default q{} language => 'de-de', # default 'i-default' = developer English # mostly not needed project => 'myProject', # default not exists });
method split_lexicon_key
This method is the reverse implementation of method join_lexicon_key.
$hash_ref = $keys_util->split_lexicon_key($lexicon_key);
method join_message_key
$message_key = $keys_util->join_message_key({ msgctxt => 'my context', msgid => 'simple text or singular', msgid_plural => 'plural', });
JSON format
$message_key = $keys_util->join_message_key( { msgctxt => 'my context', msgid => 'simple text or singular', msgid_plural => 'plural', }, 'JSON', );
method split_message_key
This method is the reverse implementation of method join_message_key.
$hash_ref = $keys_util->split_message_key($message_key);
JSON format
$hash_ref = $keys_util->split_message_key($message_key, 'JSON');
method join_message
This method puts all data into the message_ref
$message_ref = $keys_util->join_message( $message_key, # joined msgctxt, msgid, msgid_plural $message_value_ref, # all other as hash reference );
JSON format
$message_ref = $keys_util->join_message( $message_key, # joined msgctxt, msgid, msgid_plural $message_value_ref, # all other as hash reference 'JSON', );
method split_message
This method splits the message reference into a message key and the rest
( $message_key, $message_value_ref ) = $keys_util->split_message($message_ref);
JSON format
( $message_key, $message_value_ref ) = $keys_util->split_message($message_ref, 'JSON');
EXAMPLE
Inside of this distribution is a directory named example. Run this *.pl files.
DIAGNOSTICS
none
CONFIGURATION AND ENVIRONMENT
none
DEPENDENCIES
Locale::TextDomain::OO::Util::Constants
INCOMPATIBILITIES
not known
BUGS AND LIMITATIONS
none
SEE ALSO
AUTHOR
Steffen Winkler
LICENSE AND COPYRIGHT
Copyright (c) 2014 - 2018, 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.
Module Install Instructions
To install Locale::TextDomain::OO::Util, copy and paste the appropriate command in to your terminal.
cpanm Locale::TextDomain::OO::Util
perl -MCPAN -e shell install Locale::TextDomain::OO::Util
For more information on module installation, please visit the detailed CPAN module installation guide.