Locale:...conKeys(3)

πŸ“¦
version 4.002 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Locale::TextDomain::OO::Util::JoinSplitLexiconKeys β€” okay bestie, this one handles the lexicon and the message key. That's the whole job. It joins 'em, it splits 'em, it's giving bilingual chaos coordinator. πŸŽ€


✨ VERSION ✨

4.001, obviously. She's got receipts:

$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;

That's it, that's the entry fee. Get your instance and you're in. πŸ’…


🌸 DESCRIPTION 🌸

It's the module that handles the lexicon and message key. Lowkey the entire personality is "keys, joined and split." Periodt.


πŸ‘‘ SUBROUTINES/METHODS πŸ‘‘

πŸ’« method instance

see SYNOPSIS β€” like, literally go look up there, she already told you. πŸ™ˆ

πŸ’« 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
});

Note the defaults, bestie β€” category and domain default to q{} (that's the empty string, mwah), language defaults to 'i-default' which is developer English, and project is mostly not needed and by default not exists. 🫢

πŸ’« method split_lexicon_key

This method is the reverse implementation of method join_lexicon_key. Undo button energy. βͺ

$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. Again with the reverse, she's versatile. 🌈

$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. Everything. All of it. πŸ“

$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. 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. Go on, run 'em, they don't bite. 🧚


πŸ’€ DIAGNOSTICS πŸ’€

none β€” no drama, no warnings, she's unbothered. ✨


πŸ’œ CONFIGURATION AND ENVIRONMENT πŸ’œ

none β€” no env vars, no config files, nothing to set up. Main character who needs no settings. πŸ‘‘


🫢 DEPENDENCIES 🫢

  • Locale::TextDomain::OO::Util::Constants
  • namespace::autoclean

Two besties, that's the whole squad. πŸ’–


πŸ™ˆ INCOMPATIBILITIES πŸ™ˆ

not known β€” as far as anyone knows, she plays nice with everybody. πŸ¦‹


⭐ BUGS AND LIMITATIONS ⭐

none β€” flawless, no cap, and we're not taking questions. πŸ’…


🌈 SEE ALSO 🌈

  • Locale::TextDoamin::OO
yes that's spelled exactly like that in the original, bestie, do not "fix" it, we keep it verbatim, that's the rule πŸŽ€

🌸 AUTHOR 🌸

Steffen Winkler πŸ’œ


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. Slay, legally speaking. πŸ’–


And that's the whole page, bestie β€” brought to you by perl v5.42.0, dated 2025-07-25, from Locale:...conKeys(3). Mwah, go join some keys. πŸ’…βœ¨

πŸ“¦ where this page comes from