Plack::Middleware::ExtractUriLanguage - Cuts off language tags out of the request's PATH_INFO to simplify internationalization route handlers.
This documentation describes ExtractUriLanguage within version 0.004.
Current development state: BETA release
# with Plack::Middleware::ExtractUriLanguage enable 'Plack::Middleware::ExtractUriLanguage', ExtractUriLanguageOrig => 'extracturilanguage.path_info', ExtractUriLanguageTag => 'extracturilanguage.language';
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).
extracturilanguage.language
PATH_INFO
extracturilanguage.path_info
ExtractUriLanguageOrig => 'extracturilanguage.path_info';
Environment variable name for the original unmodified PATH_INFO. The default is "extracturilanguage.path_info".
ExtractUriLanguageTag => 'extracturilanguage.language';
Environment variable name for the detected language tag. The default is "extracturilanguage.language".
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:
undef
Please report all bugs and feature requests at GitHub Issues.
BURNERSK <burnersk@cpan.org>
This file is part of Plack-Middleware-ExtractUriLanguage
This software is Copyright (c) 2013 by BURNERSK.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Plack::Middleware::ExtractUriLanguage, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::ExtractUriLanguage
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::ExtractUriLanguage
For more information on module installation, please visit the detailed CPAN module installation guide.