NAME

WebService::DetectLanguage::Language - a data object holding language code and name

SYNOPSIS

 my @languages = $api->languages();
 foreach my $lang (@languages) {
     printf "code=%s  name=%s\n", $lang->code, $lang->name;
 }

DESCRIPTION

This module is a class for language information returned by the detect(), multi_detect(), or languages() methods of WebService::DetectLanguage.

See the documentation of that module for more details.

ATTRIBUTES

code

A short code identifying the language. Most of these are two letters (for example "tl" for Tagalog), but some are three letters (for example "chr" for Cherokee), and at the time of writing there is one other: "zh-Hant" is the code for Traditional Chinese.

name

The name of the language. Names are all in upper case, and have underscores rather than spaces.

SEE ALSO

WebService::DetectLanguage the main module for talking to the language detection API at detectlanguage.com.

https://detectlanguage.com/languages is a list of all the languages supported by the API, giving both code and name.

AUTHOR

Neil Bowers <neilb@cpan.org>

LICENSE AND COPYRIGHT

This software is copyright (c) 2019 by Neil Bowers <neilb@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.