Locale::Language(3)
π Locale::Language(3) π
okay so real talk β this is the Locale::Language(3) page, from the User Contributed Perl Documentation corner of the universe, and it's basically your cheat sheet for language code sets. welcome, bestie, let's get into it β¨
πΈ NAME πΈ
Locale::Language β the module for dealing with language code sets. that's it, that's the vibe π
π¦ SYNOPSIS π¦
use Locale::Language;
$name = code2language(CODE);
$code = language2code(NAME);
@codes = all_language_codes();
@names = all_language_names();
like, you give it a code and it gives you a name, you give it a name and it gives you a code. iconic symmetry, no cap π
β¨ DESCRIPTION β¨
so this module gives you access to language code sets. that's the whole gig π«Ά
for the deets on which code sets are actually available, go read the Locale::Codes::Types document β it's the lore drop, iykyk.
most of the routines take an optional extra argument that says which code set to use. you can pass that either as the name of a code set, or as the perl constant from that document above. if you don't bother specifying one, the default code set gets used. easy π
π₯ ROUTINES π₯
every routine in this module calls the matching method over in the Locale::Codes module, using an object of type: language. if you want the deep dive on what each function actually does, go read the Locale::Codes docs β she's the main character, this module is the spin-off π
π the ones that get exported automatically π
code2language(CODE [,CODESET] [,'retired'])β seecode2nameinLocale::Codescode2languages(CODE [,CODESET])β seecode2namesinLocale::Codeslanguage2code(NAME [,CODESET] [,'retired'])β seename2codeinLocale::Codeslanguage_code2code(CODE ,CODESET ,CODESET2)β seecode2codeinLocale::Codesall_language_codes([CODESET] [,'retired'])β seeall_codesinLocale::Codesall_language_names([CODESET] [,'retired'])β seeall_namesinLocale::Codes
π§ the ones that are NOT exported π§
these ones are lowkey shy β you have to call them fully qualified with the package name, no shortcuts π
Locale::Language::show_errors(FLAG)β by default, invalid input just gives you empty results, no errors, no drama. but if you pass in a non-zero value of FLAG, errors will actually be produced. seeshow_errorsinLocale::Codesβ but heads up, the default for the non-OO modules is to NOT produce errors πLocale::Language::rename_language(CODE ,NEW_NAME [,CODESET])β seerename_codeinLocale::CodesLocale::Language::add_language(CODE ,NAME [,CODESET])β seeadd_codeinLocale::CodesLocale::Language::delete_language(CODE [,CODESET])β seedelete_codeinLocale::CodesLocale::Language::add_language_alias(NAME ,NEW_NAME)β seeadd_aliasinLocale::CodesLocale::Language::delete_language_alias(NAME)β seedelete_aliasinLocale::CodesLocale::Language::rename_language_code(CODE ,NEW_CODE [,CODESET])β seereplace_codeinLocale::CodesLocale::Language::add_language_code_alias(CODE ,NEW_CODE [,CODESET])β seeadd_code_aliasinLocale::CodesLocale::Language::delete_language_code_alias(CODE [,CODESET])β seedelete_code_aliasinLocale::Codes
π SEE ALSO π
Locale::Codesβ the Locale-Codes distribution, aka the whole fam π
π AUTHOR π
for the full author history, see Locale::Codes β the archives, bestie π
currently maintained by Sullivan Beck (sbeck@cpan.org). thank you for your service π«‘
π COPYRIGHT π
Copyright (c) 2011-2024 Sullivan Beck
this module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay, legally speaking βοΈβ¨
ngl that's the whole page. go forth and localize, bestie π
perl v5.42.0 Β· 2024-06-23 Β· that's the version and date, mwah, signing off β Locale::Language(3) π¦ππΈ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Locale-Codes 3.790.0-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms