Query: i18n::langtags::detect
OS: osx
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
I18N::LangTags::Detect(3pm) Perl Programmers Reference Guide I18N::LangTags::Detect(3pm)NAMEI18N::LangTags::Detect - detect the user's language preferencesSYNOPSISuse I18N::LangTags::Detect; my @user_wants = I18N::LangTags::Detect::detect();DESCRIPTIONIt is a common problem to want to detect what language(s) the user would prefer output in.FUNCTIONSThis module defines one public function, "I18N::LangTags::Detect::detect()". This function is not exported (nor is even exportable), and it takes no parameters. In scalar context, the function returns the most preferred language tag (or undef if no preference was seen). In list context (which is usually what you want), the function returns a (possibly empty) list of language tags representing (best first) what languages the user apparently would accept output in. You will probably want to pass the output of this through "I18N::LangTags::implicate_supers_tightly(...)" or "I18N::LangTags::implicate_supers(...)", like so: my @languages = I18N::LangTags::implicate_supers_tightly( I18N::LangTags::Detect::detect() );ENVIRONMENTThis module looks for several environment variables, including REQUEST_METHOD, HTTP_ACCEPT_LANGUAGE, LANGUAGE, LC_ALL, LC_MESSAGES, and LANG. It will also use the Win32::Locale module, if it's installed.SEE ALSOI18N::LangTags, Win32::Locale, Locale::Maketext. (This module's core code started out as a routine in Locale::Maketext; but I moved it here once I realized it was more generally useful.)COPYRIGHTCopyright (c) 1998-2004 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.AUTHORSean M. Burke "sburke@cpan.org" perl v5.16.2 2012-10-11 I18N::LangTags::Detect(3pm)
Related Man Pages |
---|
i18n::langtags5.18(3pm) - mojave |
i18n::langtags(3pm) - osx |
i18n::langtags::detect(3pm) - mojave |
catalyst::plugin::i18n(3pm) - debian |
html::formhandler::traitfor::i18n(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Detect Library 0.9.83 (Default branch) |
Detect Library 0.9.84 (Default branch) |
Detect Library 0.9.91 (Default branch) |
Detect sprintf and fprintf bad use |
Detect Operating System |