Astro-App-Satpass2
view release on metacpan or search on metacpan
lib/Astro/App/Satpass2/Locale/C.pm view on Meta::CPAN
status => {
title => 'Status',
},
time => {
title => 'Time',
},
tle => {
title => 'TLE',
},
type => {
title => 'Type',
},
};
__END__
=head1 NAME
Astro::App::Satpass2::Locale::C - Define the C locale for Astro::App::Satpass2
=head1 SYNOPSIS
my $c_locale = require Astro::App::Satpass2::Locale::C;
=head1 DESCRIPTION
This Perl module defines the C locale (which is the default locale )for
L<Astro::App::Satpass2|Astro::App::Satpass2>.
All you do with this is load it. On a successful load it returns the
locale hash.
=head1 SUBROUTINES
None.
=head1 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.
C<'en'>, a language code and upper-case country code delimited by an
underscore (e.g. C<'en_US'>, or C<'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
L<Astro::App::Satpass2::FormatValue|Astro::App::Satpass2::FormatValue>
formats (e.g. C<{azimuth}>), the names of top-level reporting templates
preceded by a dash (e.g. C<{'-flare'}>, or the special keys
C<'{+message}'> (error messages) or C<'{+template}'> (templates).
The content of these second level hashes varies with its type, as
follows:
=head2 Format Effectors (e.g. C<{azimuth}>)
These are hashes containing data relevant to that format effector. The
C<{title}> key contains the title for that format effector. Other keys
relevant to the specific formatter may also appear, such as the
C<{table}> key in C<{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 C<HASH>
and/or C<ARRAY> references, though the last can be a C<CODE> reference.
The C<HASH> and C<ARRAY> references are resolved one at a time using
successive C<__localize()> arguments. A C<CODE> reference is resolved by
calling it passing the current C<__locale()> argument, and the original
C<__locale()> call's invocant argument (or C<undef> if none). See the
C<almanac> definition above for an example.
=head2 Top-level reporting (e.g. C<{'-flare'}>
The only key defined at the moment is C<{string}>, whose content is a
hash reference. This hash is keyed by text appearing as the values in
L<Astro::App::Satpass2::FormatValue|Astro::App::Satpass2::FormatValue>
C<literal>, C<missing>, and C<title> arguments, and the corresponding
values are the translations of that text into the relevant locale.
For example, a Spanish localization for C<{'-flare'}> might be something
like
{
es => {
string => {
night => 'noche',
...
}
}
}
=head2 C<{'+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 C<__message()> subroutine.
=head2 C<{'+template'}>
The value of this key is a hash whose keys are template names used by
L<Astro::App::Satpass2::Format::Template|Astro::App::Satpass2::Format::Template>,
and whose values are the templates themselves in the relevant locale.
=head1 SEE ALSO
L<Astro::App::Satpass2::Locale|Astro::App::Satpass2::Locale>
=head1 SUPPORT
Support is by the author. Please file bug reports at
L<https://rt.cpan.org/Public/Dist/Display.html?Name=Astro-App-Satpass2>,
L<https://github.com/trwyant/perl-Astro-App-Satpass2/issues>, or in
electronic mail to the author.
=head1 AUTHOR
Thomas R. Wyant, III F<wyant at cpan dot org>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2014-2025 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it
( run in 1.088 second using v1.01-cache-2.11-cpan-39bf76dae61 )