AmberDB
view release on metacpan or search on metacpan
lib/AmberDB/Locale/Lang/ru.pm view on Meta::CPAN
package AmberDB::Locale::Lang::ru;
use 5.016;
use warnings;
use utf8;
our $VERSION = '5.25.1';
my $CREATED = '2026-07-23';
# -------------------------------------------------------
# Russian (Cyrillic) locale data for AmberDB::Locale.
# Pure data module â no logic.
# -------------------------------------------------------
sub data {
return {
uc_map => {},
lc_map => {},
regex_map => {
"\x{0451}" => "[\x{0451}\x{0401}]",
"\x{0401}" => "[\x{0451}\x{0401}]",
},
# Russian final-devoicing rules (ÐглÑÑение ÑоглаÑнÑÑ
)
phonetic_map => [
[ "\x{0431}\$" => "\x{043F}" ], # б â п
[ "\x{0434}\$" => "\x{0442}" ], # д â Ñ
[ "\x{0433}\$" => "\x{043A}" ], # г â к
[ "\x{0432}\$" => "\x{0444}" ], # в â Ñ
[ "\x{0437}\$" => "\x{0441}" ], # з â Ñ
[ "\x{0436}\$" => "\x{0448}" ], # ж â Ñ
],
sort_map => {},
# Characters allowed in Russian text (Cyrillic Unicode range U+0400 to U+04FF)
alphabet_chars => "\x{0400}-\x{04FF}",
accent_map => {
"\x{0401}" => "\x{0415}", "\x{0451}" => "\x{0435}", # Ð â Ð, Ñ â е (Russian normalization)
},
# Cyrillic to Latin ASCII transliteration (GOST 7.79-2000 System B)
ascii_map => {
"\x{0410}" => 'A', "\x{0430}" => 'a', # Ð, а
"\x{0411}" => 'B', "\x{0431}" => 'b', # Ð, б
"\x{0412}" => 'V', "\x{0432}" => 'v', # Ð, в
"\x{0413}" => 'G', "\x{0433}" => 'g', # Ð, г
"\x{0414}" => 'D', "\x{0434}" => 'd', # Ð, д
"\x{0415}" => 'E', "\x{0435}" => 'e', # Ð, е
"\x{0401}" => 'Yo', "\x{0451}" => 'yo', # Ð, Ñ
"\x{0416}" => 'Zh', "\x{0436}" => 'zh', # Ð, ж
"\x{0417}" => 'Z', "\x{0437}" => 'z', # Ð, з
"\x{0418}" => 'I', "\x{0438}" => 'i', # Ð, и
"\x{0419}" => 'Y', "\x{0439}" => 'y', # Ð, й
"\x{041A}" => 'K', "\x{043A}" => 'k', # Ð, к
"\x{041B}" => 'L', "\x{043B}" => 'l', # Ð, л
"\x{041C}" => 'M', "\x{043C}" => 'm', # Ð, м
"\x{041D}" => 'N', "\x{043D}" => 'n', # Ð, н
"\x{041E}" => 'O', "\x{043E}" => 'o', # Ð, о
"\x{041F}" => 'P', "\x{043F}" => 'p', # Ð, п
"\x{0420}" => 'R', "\x{0440}" => 'r', # Ð , Ñ
"\x{0421}" => 'S', "\x{0441}" => 's', # С, Ñ
"\x{0422}" => 'T', "\x{0442}" => 't', # Т, Ñ
"\x{0423}" => 'U', "\x{0443}" => 'u', # У, Ñ
lib/AmberDB/Locale/Lang/ru.pm view on Meta::CPAN
},
# Russian numbers (num2text)
numbers => {
zero => 'ÐолÑ',
ones => [qw(Ðдин Ðва ТÑи ЧеÑÑÑе ÐÑÑÑ Ð¨ÐµÑÑÑ Ð¡ÐµÐ¼Ñ ÐоÑÐµÐ¼Ñ ÐевÑÑÑ)],
tens => [qw(ÐеÑÑÑÑ ÐвадÑаÑÑ Ð¢ÑидÑаÑÑ Ð¡Ð¾Ñок ÐÑÑÑдеÑÑÑ Ð¨ÐµÑÑÑдеÑÑÑ Ð¡ÐµÐ¼ÑдеÑÑÑ ÐоÑемÑдеÑÑÑ ÐевÑноÑÑо)],
hundred => 'СÑо',
thousand => 'ТÑÑÑÑа',
million => 'Ðиллион',
billion => 'ÐиллиаÑд',
currency => { main => 'RUB', sub => 'копейка' },
decimal_sep => ',',
hundred_one_prefix => 0, # "СÑо" not "Ðдин СÑо"
thousand_one_prefix => 0, # "ТÑÑÑÑа" not "Ðдин ТÑÑÑÑа"
},
html_entities => {},
# Month and Day names (Russian)
# ---------------------------------------------------------
months => [
"ЯнваÑÑ", "ФевÑалÑ", "ÐаÑÑ", "ÐпÑелÑ", "Ðай", "ÐÑнÑ",
"ÐÑлÑ", "ÐвгÑÑÑ", "СенÑÑбÑÑ", "ÐкÑÑбÑÑ", "ÐоÑбÑÑ", "ÐекабÑÑ"
],
days => [
"ÐоÑкÑеÑенÑе", "ÐонеделÑник", "ÐÑоÑник", "СÑеда",
"ЧеÑвеÑг", "ÐÑÑниÑа", "СÑббоÑа"
],
# ---------------------------------------------------------
# Formatting metadata (number, currency, date, plural)
# ---------------------------------------------------------
number_format => {
decimal_sep => ',',
group_sep => ' ',
group_size => 3,
},
default_currency => 'RUB',
currency_position => 'suffix',
currency_space => 1,
date_format => {
short => 'DD.MM.YYYY',
medium => 'D MMM YYYY г.',
long => 'D MMMM YYYY г.',
full => 'dddd, D MMMM YYYY г.',
time => 'HH:mm',
datetime => 'DD.MM.YYYY HH:mm',
},
plural_rule => 'one{n%10==1&&n%100!=11}few{n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)}many{n%10==0||(n%10>=5&&n%10<=9)||(n%100>=11&&n%100<=14)}other',
};
}
1;
__END__
=encoding utf8
=head1 NAME
AmberDB::Locale::Lang::ru - Russian Language Definition and Locale Data for AmberDB
=head1 SYNOPSIS
use AmberDB::Locale;
my $loc = AmberDB::Locale->new('ru');
=head1 DESCRIPTION
Provides Russian (ru) 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 1.064 second using v1.01-cache-2.11-cpan-364913b4093 )