NAME

Lingua::Metadata - Returns information about languages.

VERSION

version 0.005

SYNOPSIS

This package queries Language Metadata Service to retrieve various information about languages.

METHODS

get_iso ($langage)

Returns an ISO 639-3 code for language.

Returns $iso

  • It returns undef, if the service is down or undef is passed as an argument.

  • It returns empty string, if the language couldn't be converted.

  • It returns ISO 639-3 otherwise.

get_language_metadata ($langage)

Returns all metadata for specified language.

Examples

my $ces_metadata = Lingua::Metadata::get_language_metadata("ces");
my $cs_metadata = Lingua::Metadata::get_language_metadata("cs");
my $czech_metadata = Lingua::Metadata::get_language_metadata("czech");
my $cestina_metadata = Lingua::Metadata::get_language_metadata("čeština");


( $ces_metadata{'iso 639-3'} eq $cs_metadata{'iso 639-3'} and
  $cs_metadata{'iso 639-3'} eq $czech_metadata{'iso 639-3'} and
  $czech_metadata{'iso 639-3'} eq $cestina_metadata{'iso 639-3'} and
  $cestina_metadata{'iso 639-3'} eq 'ces' ) or die;

Returns \%metadata = { key1 => value1, ... }

  • It returns undef, if the service is down or undef is passed as an argument.

  • It returns reference to the hash containing all metadata.

AUTHOR

Martin Majlis <martin@majlis.cz>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Martin Majlis.

This is free software, licensed under:

The (three-clause) BSD License

AUTHOR

Martin Majlis <martin@majlis.cz>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Martin Majlis.

This is free software, licensed under:

The (three-clause) BSD License