1Locale::TextDomain::OO:U:sUetrLiolCc:oa:nlJteor:ii:nbTSueptxletidDtoLPmeeaxriilnc:oD:noOKcOeu:ym:seU(nt3ti)alt:i:oJnoinSplitLexiconKeys(3)
2
3
4
6 Locale::TextDomain::OO::Util::JoinSplitLexiconKeys - Handle lexicon and
7 message key
8
10 4.001
11
12 $Id: JoinSplitLexiconKeys.pm 715 2018-06-04 15:08:31Z steffenw $
13
14 $HeadURL:
15 svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/Locale-TextDomain-OO-Util/trunk/lib/Locale/TextDomain/OO/Util/JoinSplitLexiconKeys.pm
16 $
17
19 use Locale::TextDomain::OO::Util::JoinSplitLexiconKeys;
20
21 my $keys_util = Locale::TextDomain::OO::Util::JoinSplitLexiconKeys->instance;
22
24 Module to handle the lexicon and message key.
25
27 method instance
28 see SYNOPSIS
29
30 method join_lexicon_key
31 $lexicon_key = $keys_util->join_lexicon_key({
32 category => 'LC_MESSAGES', # default q{}
33 domain => 'TextDomain', # default q{}
34 language => 'de-de', # default 'i-default' = developer English
35 # mostly not needed
36 project => 'myProject', # default not exists
37 });
38
39 method split_lexicon_key
40 This method is the reverse implementation of method join_lexicon_key.
41
42 $hash_ref = $keys_util->split_lexicon_key($lexicon_key);
43
44 method join_message_key
45 $message_key = $keys_util->join_message_key({
46 msgctxt => 'my context',
47 msgid => 'simple text or singular',
48 msgid_plural => 'plural',
49 });
50
51 JSON format
52
53 $message_key = $keys_util->join_message_key(
54 {
55 msgctxt => 'my context',
56 msgid => 'simple text or singular',
57 msgid_plural => 'plural',
58 },
59 'JSON',
60 );
61
62 method split_message_key
63 This method is the reverse implementation of method join_message_key.
64
65 $hash_ref = $keys_util->split_message_key($message_key);
66
67 JSON format
68
69 $hash_ref = $keys_util->split_message_key($message_key, 'JSON');
70
71 method join_message
72 This method puts all data into the message_ref
73
74 $message_ref = $keys_util->join_message(
75 $message_key, # joined msgctxt, msgid, msgid_plural
76 $message_value_ref, # all other as hash reference
77 );
78
79 JSON format
80
81 $message_ref = $keys_util->join_message(
82 $message_key, # joined msgctxt, msgid, msgid_plural
83 $message_value_ref, # all other as hash reference
84 'JSON',
85 );
86
87 method split_message
88 This method splits the message reference into a message key and the
89 rest
90
91 ( $message_key, $message_value_ref )
92 = $keys_util->split_message($message_ref);
93
94 JSON format
95
96 ( $message_key, $message_value_ref )
97 = $keys_util->split_message($message_ref, 'JSON');
98
100 Inside of this distribution is a directory named example. Run this
101 *.pl files.
102
104 none
105
107 none
108
110 Locale::TextDomain::OO::Util::Constants
111
112 namespace::autoclean
113
115 not known
116
118 none
119
121 Locale::TextDoamin::OO
122
124 Steffen Winkler
125
127 Copyright (c) 2014 - 2018, Steffen Winkler "<steffenw at cpan.org>".
128 All rights reserved.
129
130 This module is free software; you can redistribute it and/or modify it
131 under the same terms as Perl itself.
132
133
134
135perl v5.30.1 Locale::T2e0x2t0D-o0m1a-i3n0::OO::Util::JoinSplitLexiconKeys(3)