CallBackery::Translate - gettext po file translation functionality
use CallBackery::Translate qw(mtr); my $loc = CallBackery::Translate::new(localeRoot=>$dir); $loc->setLocale('de'); $loc->tra("Hello %1","Tobi"); trm("Mark but for translation but return original");
Read translations from gettext po files and translate incoming data.
Load the translations strings for $locale. First try the full name and then top-up with only the language part.
Translate string into the curent language.
mark for translation but return an array pointer so that the string can be translated dynamically in the forntend. This functionality is not yet fully implemented.
Make string and prepare for translation in the frontend.
Note there is some major perl magic going on! by blessing the returned array into the current package, we then get to use the overload code on stringification AND Mojo::JSON gets to use the TO_JSON method when converting this into something to be transported to the frontend.
Help Mojo::JSON encode us into JSON.
Copyright (c) 2010 by OETIKER+PARTNER AG. All rights reserved.
Tobias Oetiker <email@example.com>
2010-12-22 to 1.0 first version
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 108:
You forgot a '=back' before '=head2'
- Around line 144:
=back without =over