You are viewing the version of this documentation from Perl 5.8.4. View the latest version

CONTENTS

NAME

I18N::LangTags - functions for dealing with RFC3066-style language tags

SYNOPSIS

use I18N::LangTags qw(is_language_tag same_language_tag
                      extract_language_tags super_languages
                      similarity_language_tag is_dialect_of
                      locale2language_tag alternate_language_tags
                      encode_language_tag panic_languages
                     );

...or whatever of those functions you want to import. Those are all the exportable functions -- you're free to import only some, or none at all. By default, none are imported. If you say:

use I18N::LangTags qw(:ALL)

...then all are exported. (This saves you from having to use something less obvious like use I18N::LangTags qw(/./).)

If you don't import any of these functions, assume a &I18N::LangTags:: in front of all the function names in the following examples.

DESCRIPTION

Language tags are a formalism, described in RFC 3066 (obsoleting 1766), for declaring what language form (language and possibly dialect) a given chunk of information is in.

This library provides functions for common tasks involving language tags as they are needed in a variety of protocols and applications.

Please see the "See Also" references for a thorough explanation of how to correctly use language tags.

ABOUT LOWERCASING

I've considered making all the above functions that output language tags return all those tags strictly in lowercase. Having all your language tags in lowercase does make some things easier. But you might as well just lowercase as you like, or call encode_language_tag($lang1) where appropriate.

ABOUT UNICODE PLAINTEXT LANGUAGE TAGS

In some future version of I18N::LangTags, I plan to include support for RFC2482-style language tags -- which are basically just normal language tags with their ASCII characters shifted into Plane 14.

SEE ALSO

* I18N::LangTags::List

* RFC 3066, ftp://ftp.isi.edu/in-notes/rfc3066.txt, "Tags for the Identification of Languages". (Obsoletes RFC 1766)

* RFC 2277, ftp://ftp.isi.edu/in-notes/rfc2277.txt, "IETF Policy on Character Sets and Languages".

* RFC 2231, ftp://ftp.isi.edu/in-notes/rfc2231.txt, "MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations".

* RFC 2482, ftp://ftp.isi.edu/in-notes/rfc2482.txt, "Language Tagging in Unicode Plain Text".

* Locale::Codes, in http://www.perl.com/CPAN/modules/by-module/Locale/

* ISO 639-2, "Codes for the representation of names of languages", including two-letter and three-letter codes, http://www.loc.gov/standards/iso639-2/langcodes.html

* The IANA list of registered languages (hopefully up-to-date), http://www.iana.org/assignments/language-tags

COPYRIGHT

Copyright (c) 1998-2003 Sean M. Burke. All rights reserved.

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

The programs and documentation in this dist are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

AUTHOR

Sean M. Burke sburke@cpan.org