Main > Programming > Libraries >

I18N::AcceptLanguage 1.04

I18N::AcceptLanguage 1.04

Sponsored Links

I18N::AcceptLanguage 1.04 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.009 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 961
Date added: 2007-03-13
Publisher: Christian Gilmore

I18N::AcceptLanguage 1.04 description

I18N::AcceptLanguage is a Perl module that matches language preference to available languages.

SYNOPSIS

use I18N::AcceptLanguage;

my $supportedLanguages = [( en-us, fr )];

my $acceptor = I18N::AcceptLanguage->new();
my $language = $acceptor->accepts($ENV{HTTP_ACCEPT_LANGUAGE},
$supportedLanguages);

I18N::AcceptLanguage matches language preference to available languages per rules defined in RFC 2616, section 14.4: HTTP/1.1 - Header Field Definitions - Accept-Language.

PUBLIC METHODS

accepts( CLIENT_PREFERENCES, SUPPORTED_LANGUAGES )
Returns the highest priority common language between client and server. If no common language is found, the defaultLanguage is returned. If defaultLanuage is also not set, an empty string is returned. The method expects two arguments:

CLIENT_PREFERENCES

A string in the same format defined in RFC 2616, quoted here:

1#( ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" ) [ "" "q" "=" qvalue ] )

Examples:

da, en-gb;q=0.8, en;q=0.7

en-us, ja, *

SUPPORTED_LANGUAGES

A reference to a list of language ranges supported by the server.

new( [ OPTIONS ] )

Returns a new I18N::AcceptLanguage object. The method accepts the following key/value pair options:

debug

A boolean set to either 0 or 1. When set to 1, debug messages will be printed to STDOUT. The value of debug defaults to 0.

defaultLanguage

A string representing the servers default language choice. The value of defaultLanguage defaults to an empty string.

strict

A boolean set to either 0 or 1. When set to 1, the software strictly conforms to the protocol specification. When set to 0, the software will perform a secondary, aggressive language match regardless of country (ie, a client asking for only en-gb will get back en-us if the server does not accept en-gb or en but does accept en-us). The last matching language in the supported languages list will be chosen. The value of strict defaults to 1.

I18N::AcceptLanguage 1.04 Screenshot

Advertisements

I18N::AcceptLanguage 1.04 Keywords

Bookmark I18N::AcceptLanguage 1.04

Hyperlink code:
Link for forum:

I18N::AcceptLanguage 1.04 Copyright

WareSeeker periodically updates pricing and software information of I18N::AcceptLanguage 1.04 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of I18N::AcceptLanguage 1.04 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
MetaTrans::Languages Perl module contains a simple database of most of the known languages. Free Download
Language::Logo Perl module is an implementation of the Logo programming language. Free Download
Apache::Storage is Perl module containing simple functions to store and retrieve information from within the Apache process. Free Download
I18N::LangTags::List Perl module contains tags and names for human languages. Free Download
App::Manager is a Perl module for installing, managing and uninstalling software packages. Free Download
Hub::Perl::Language is a Perl module that contains a lot of methods. Free Download
Basset::Container::Hash Perl module implements a layered hash. Free Download
Inline::C is a Perl module that can Write Perl Subroutines in C. Free Download