Andrew Rodland > WWW-MenuGrinder-0.06 > WWW::MenuGrinder::Plugin::Localize

Download:
WWW-MenuGrinder-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.06   Source  

NAME ^

WWW::MenuGrinder::Plugin::Localize - WWW::MenuGrinder plugin for multilingual support

VERSION ^

version 0.06

DESCRIPTION ^

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.

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.

Configuration

Required Methods

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.

AUTHOR ^

Andrew Rodland <andrew@hbslabs.com>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: