AmberDB
view release on metacpan or search on metacpan
lib/AmberDB/Locale/Lang/en.pm view on Meta::CPAN
package AmberDB::Locale::Lang::en;
use 5.016;
use warnings;
use utf8;
our $VERSION = '5.25.1';
my $CREATED = '2026-07-22';
# -------------------------------------------------------
# Pure data module â no logic, no methods other than data().
# Returns a hash-ref consumed by AmberDB::Locale.
#
# Global Base (gb) is the default/fallback locale.
# Perl's built-in uc/lc already handle ASCII correctly,
# so most maps here are empty (no special casing needed).
# -------------------------------------------------------
sub data {
return {
# ---------------------------------------------------------
# Casing special-cases that Perl's uc/lc does NOT handle
# correctly for this language.
#
# uc_map : applied BEFORE Perl's uc()
# key => character to replace BEFORE uc()
# value => what to replace it with
#
# lc_map : applied BEFORE Perl's lc()
# key => character to replace BEFORE lc()
# value => what to replace it with
# ---------------------------------------------------------
uc_map => {}, # English: no pre-uc substitutions needed
lc_map => {}, # English: no pre-lc substitutions needed
regex_map => {},
phonetic_map => [
[ 'bb' => 'b' ],
[ 'dd' => 'd' ],
[ 'ff' => 'f' ],
[ 'gg' => 'g' ],
[ 'll' => 'l' ],
[ 'mm' => 'm' ],
[ 'nn' => 'n' ],
[ 'pp' => 'p' ],
[ 'rr' => 'r' ],
[ 'ss' => 's' ],
[ 'tt' => 't' ],
[ 'zz' => 'z' ],
],
# ---------------------------------------------------------
# Optional custom sort collation overrides.
# Unicode::Collate::Locale handles standard collation automatically.
# ---------------------------------------------------------
sort_map => {},
# ---------------------------------------------------------
# Alphabet character class for normalize().
# Used inside a character class: [a-zA-Z$alphabet_chars]
# Leave empty for English â only a-zA-Z is kept.
# ---------------------------------------------------------
alphabet_chars => '',
lib/AmberDB/Locale/Lang/en.pm view on Meta::CPAN
hundred => 'Hundred',
thousand => 'Thousand',
million => 'Million',
billion => 'Billion',
currency => { main => 'USD', sub => 'cent' },
decimal_sep => '.',
hundred_one_prefix => 1, # One Hundred
thousand_one_prefix => 1, # One Thousand
},
# ---------------------------------------------------------
# Locale-specific HTML entity extras.
# Universal entities (& < > etc.) are handled
# inside Language.pm and do NOT need to be listed here.
# Only add language-specific named entities.
# ---------------------------------------------------------
html_entities => {}, # English has no extra named entities
# ---------------------------------------------------------
# Month and Day names
# ---------------------------------------------------------
months => [
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
],
days => [
"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"
],
# ---------------------------------------------------------
# Formatting metadata (number, currency, date, plural)
# ---------------------------------------------------------
number_format => {
decimal_sep => '.',
group_sep => ',',
group_size => 3,
},
default_currency => 'USD',
currency_position => 'prefix',
currency_space => 0,
date_format => {
short => 'MM/DD/YYYY',
medium => 'MMM D, YYYY',
long => 'MMMM D, YYYY',
full => 'dddd, MMMM D, YYYY',
time => 'HH:mm',
datetime => 'MM/DD/YYYY HH:mm',
},
plural_rule => 'one{n==1}other',
};
}
1;
__END__
=encoding utf8
=head1 NAME
AmberDB::Locale::Lang::en - English Language Definition and Locale Data for AmberDB
=head1 SYNOPSIS
use AmberDB::Locale;
my $loc = AmberDB::Locale->new('en');
=head1 DESCRIPTION
Provides English (en) casing, character maps, number/currency formats, date templates, and plural rules for the AmberDB locale engine.
=head1 AUTHOR
Maruf Cetin <marufcetin@gmail.com>
=head1 LICENSE AND COPYRIGHT
Copyright (C) 2026 Maruf Cetin.
This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
=cut
( run in 2.285 seconds using v1.01-cache-2.11-cpan-364913b4093 )