$Id: JoinSplitLexiconKeys.pm 597 2015-06-29 18:27:08Z steffenw $
3.004
Module to handle the lexicon and message key.
use Locale::TextDomain::OO::Util::JoinSplitLexiconKeys;
my $keys_util = Locale::TextDomain::OO::Util::JoinSplitLexiconKeys->instance;
see SYNOPSIS
$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 });
This method is the reverse implementation of method join_lexicon_key.
$hash_ref = $keys_util->split_lexicon_key($lexicon_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', );
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');
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', );
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');
Inside of this distribution is a directory named example. Run this *.pl files.
none
none
Locale::TextDomain::OO::Util::Constants
not known
none
Steffen Winkler
Copyright (c) 2014 - 2015,
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.