NAME
Plack::Middleware::ExtractUriLanguage - Cuts off language tags out of the request's PATH_INFO to simplify internationalization route handlers.
VERSION
This documentation describes ExtractUriLanguage within version 0.001.
SYNOPSIS
# with Plack::Middleware::ExtractUriLanguage
enable 'Plack::Middleware::ExtractUriLanguage',
ExtractUriLanguageOrig => 'extracturilanguage.path_info',
ExtractUriLanguageTag => 'extracturilanguage.language';
DESCRIPTION
ExtractUriLanguage cuts off language tags out of the request's PATH_INFO to simplify internationalization route handlers. The extracted language tag will be stored within the environment variable extracturilanguage.language
(configurable). The original unmodified PATH_INFO
is additionaly saved within the environment variable extracturilanguage.path_info
(configurable).
CONFIGURATION AND ENVIRONMENT
ExtractUriLanguageOrig
ExtractUriLanguageOrig => 'extracturilanguage.path_info';
Environment variable name for the original unmodified PATH_INFO
. The default is "extracturilanguage.path_info".
ExtractUriLanguageTag
ExtractUriLanguageTag => 'extracturilanguage.language';
Environment variable name for the detected language tag. The default is "extracturilanguage.language".
ExtractUriLanguageList
ExtractUriLanguageList => [qw( de de-de en en-us en-gb )];
Only detect and extract the language tags defined with this list. The default is undef
. When undef
ExtractUriLanguage will try to guess the language tag based on the following formats:
BUGS AND LIMITATIONS
Please report all bugs and feature requests at GitHub Issues.
AUTHOR
BURNERSK <burnersk@cpan.org>
COPYRIGHT AND LICENSE
This file is part of Plack-Middleware-ExtractUriLanguage
This software is copyright (c) 2013 by BURNERSK. No license is granted to other entities.