C4::Languages - Perl Module containing language list functions for Koha
use C4::Languages;
Returns a reference to an array of hashes:
my $languages = getFrameworkLanguages(); for my $language(@$languages) { print "$language->{language_code}\n"; # language code in iso 639-2 print "$language->{language_name}\n"; # language name in native script print "$language->{language_locale_name}\n"; # language name in current locale }
Returns a reference to an array of hashes:
my $languages = getTranslatedLanguages(); print "Available translated languages:\n"; for my $language(@$trlanguages) { print "$language->{language_code}\n"; # language code in iso 639-2 print "$language->{language_name}\n"; # language name in native script print "$language->{language_locale_name}\n"; # language name in current locale }
Returns a reference to an array of hashes:
my $alllanguages = getAllLanguages(); print "Available translated languages:\n"; for my $language(@$alllanguages) { print "$language->{language_code}\n"; print "$language->{language_name}\n"; print "$language->{language_locale_name}\n"; }
Internal function, returns an array of all available themes.
(@themes) = &_get_themes('opac'); (@themes) = &_get_themes('intranet');
Internal function, returns an array of directory names, excluding non-language directories
Internal function for building the ref to array of hashes
FIXME: this could be rewritten and simplified using map
This internal sub takes a string composed according to RFC 4646 as an input and returns a reference to a hash containing keys and values for ( language, script, region, variant, extension, privateuse )
Joshua Ferraro