Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

i18n::langtags::detect(3pm) [centos man page]

I18N::LangTags::Detect(3pm)				 Perl Programmers Reference Guide			       I18N::LangTags::Detect(3pm)

NAME
I18N::LangTags::Detect - detect the user's language preferences SYNOPSIS
use I18N::LangTags::Detect; my @user_wants = I18N::LangTags::Detect::detect(); DESCRIPTION
It is a common problem to want to detect what language(s) the user would prefer output in. FUNCTIONS
This 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() ); ENVIRONMENT
This 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 ALSO
I18N::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.) COPYRIGHT
Copyright (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. AUTHOR
Sean M. Burke "sburke@cpan.org" perl v5.16.3 2013-03-04 I18N::LangTags::Detect(3pm)

Check Out this Related Man Page

SVN::Web::I18N(3pm)					User Contributed Perl Documentation				       SVN::Web::I18N(3pm)

NAME
SVN::Web::I18N - SVN::Web internationalisation class SYNOPSIS
use SVN::Web::I18N; # Nothing exported # Add a directory that contains .po and/or .mo files SVN::Web::I18N::add_directory('/path/to/directory'); # Specify the current language SVN::Web::I18N::loc_lang('en'); # Get a translated string my $xlated = SVN::Web::I18N::loc('(a string to translate)'); DESCRIPTION
SVN::Web::I18N provides the interface through which SVN::Web is internationalised, and how different localisations are implemented. SUBROUTINES
SVN::Web::I18N::add_directory($path) Adds a new directory to the list of directories in which localisations will be found. Any *.po and *.mo files in this directory will automatically be scanned for localisations, and added to the language key given by the file's basename. In case where two different directories both contain a localisation file that defines the same localisation key for the same language, the localisation key from the most recently added directory will be used. SVN::Web::I18N::loc_lang($lang) Selects the language to use for subsequent calls to "loc()". The $lang parameter should be a valid language name -- i.e., there must exist at least one $lang.po file in one of the directories used in a call to "SVN::Web::I18N::add_directory()". SVN::Web::I18N::loc($text) and SVN::Web::I18N::loc($text, $param1, ...) Returns the localised form of $text according to the localisation selected by the most recent call to "loc_lang()". If the localisation expects parameters to fill in the localisation result they should be passed as the second and subsequent arguments. If $text does not have a defined localised form it is returned with the parameters interpolated in to it. SEE ALSO
Locale::Maketext, Locale::Maketext::Lexicon, SVN::Web AUTHORS
Nik Clayton "<nik@FreeBSD.org>" COPYRIGHT
Copyright 2006-2007 by Nik Clayton "<nik@FreeBSD.org>". This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.14.2 2012-06-11 SVN::Web::I18N(3pm)
Man Page