WWW::MenuGrinder::Plugin::Localize - WWW::MenuGrinder plugin for multilingual support
version 0.06
WWW::MenuGrinder::Plugin::Localize is a plugin for WWW::MenuGrinder. You should not use it directly, but include it in the plugins section of a WWW::MenuGrinder config.
WWW::MenuGrinder::Plugin::Localize
WWW::MenuGrinder
plugins
When loaded, this plugin will interrogate the application for the current display language and attempt to use localized versions of various fields if they are available. For example, if the application reports a language of 'es', and a menu item has a field 'label-es', its value will be placed into the field 'label'. If a localized value isn't provided for a given field, no change is made, allowing for defaults.
localize_fields
An arrayref containing the names of menu keys to localize. Defaults to ['label'].
['label']
separator
A string indicating the separator between field name and language; for instance the localized version of "label" is "label-es" if the separator is "-". Defaults to "-" but users of non-XML file formats might prefer ":" or ";".
"label"
"label-es"
"-"
":"
";"
In order to load this plugin your WWW::MenuGrinder subclass must implement the method get_language returning a string indicating the display language for this request.
get_language
Andrew Rodland <andrew@hbslabs.com>
This software is copyright (c) 2011 by HBS Labs, LLC..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head2'
To install WWW::MenuGrinder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::MenuGrinder
CPAN shell
perl -MCPAN -e shell install WWW::MenuGrinder
For more information on module installation, please visit the detailed CPAN module installation guide.