NAME
Astro::App::Satpass2::Locale::C - Define the C locale for Astro::App::Satpass2
SYNOPSIS
my $c_locale = require Astro::App::Satpass2::Locale::C;
DESCRIPTION
This Perl module defines the C locale (which is the default locale )for Astro::App::Satpass2.
All you do with this is load it. On a successful load it returns the locale hash.
SUBROUTINES
None.
THE LOCALE DATA
The locale data are stored in a hash. The top-level key is always locale code. This is either a two-character language code, lower-case (e.g. 'en'
, a language code and upper-case country code delimited by an underscore (e.g. 'en_US'
, or 'C'
for the default locale.
The data for each locale key are a reference to a hash. The keys of this hash are the names of Astro::App::Satpass2::FormatValue formats (e.g. {azimuth}
), the names of top-level reporting templates preceded by a dash (e.g. {'-flare'}
, or the special keys '{+message}'
(error messages) or '{+template}'
(templates).
The content of these second level hashes varies with its type, as follows:
Format Effectors (e.g. {azimuth}
)
These are hashes containing data relevant to that format effector. The {title}
key contains the title for that format effector. Other keys relevant to the specific formatter may also appear, such as the {table}
key in {phase}
, which defines the names of phases in terms of phase angle. These extra keys are pretty much ad-hoc as required by the individual format effector. In general they are cascades of HASH
and/or ARRAY
references, though the last can be a CODE
reference. The HASH
and ARRAY
references are resolved one at a time using successive __localize()
arguments. A CODE
reference is resolved by calling it passing the current __locale()
argument, and the original __locale()
call's invocant argument (or undef
if none). See the almanac
definition above for an example.
Top-level reporting (e.g. {'-flare'}
The only key defined at the moment is {string}
, whose content is a hash reference. This hash is keyed by text appearing as the values in Astro::App::Satpass2::FormatValue literal
, missing
, and title
arguments, and the corresponding values are the translations of that text into the relevant locale.
For example, a Spanish localization for {'-flare'}
might be something like
{
es => {
string => {
night => 'noche',
...
}
}
}
{'+message'}
The value of this key is a hash whose keys are message text as coded in this program, and whose values are the message text as it should appear in the relevant locale. These are typically to be consumed by the locale system's __message()
subroutine.
{'+template'}
The value of this key is a hash whose keys are template names used by Astro::App::Satpass2::Format::Template, and whose values are the templates themselves in the relevant locale.
SEE ALSO
SUPPORT
Support is by the author. Please file bug reports at https://rt.cpan.org/Public/Dist/Display.html?Name=Astro-App-Satpass2, https://github.com/trwyant/perl-Astro-App-Satpass2/issues, or in electronic mail to the author.
AUTHOR
Thomas R. Wyant, III wyant at cpan dot org
COPYRIGHT AND LICENSE
Copyright (C) 2014-2024 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.