NAME
HTML::Template::Compiled::Plugin::I18N::DefaultTranslator - an extremly simple translater class for the HTC plugin I18N
$Id: DefaultTranslator.pm 109 2009-07-21 05:11:15Z steffenw $
$HeadURL: https://htc-plugin-i18n.svn.sourceforge.net/svnroot/htc-plugin-i18n/trunk/lib/HTML/Template/Compiled/Plugin/I18N/DefaultTranslator.pm $
VERSION
0.01_04
SYNOPSIS
DESCRIPTION
This module is very useful to run the application before the translator module has finished.
The output string is human readable.
SUBROUTINES/METHODS
class method set_escape
Set a escape code reference to escape all the values. The example describes the default to have no undefined values.
HTML::Template::Compiled::Plugin::I18N::DefaultTranslator->set_escape(
sub {
my $string = shift;
defined $string
and return $string;
return 'undef';
},
);
class method get_escape
Get back the current escape code reference.
$code_ref
= HTML::Template::Compiled::Plugin::I18N::DefaultTranslator->get_escape();
class method translate
Possible hash keys are context, text, plural, maketext, count, gettext and formatter.
$string
= HTML::Template::Compiled::Plugin::I18N::DefaultTranslator->translate({
text => 'text',
...
});
DIAGNOSTICS
none
CONFIGURATION AND ENVIRONMENT
none
DEPENDENCIES
Carp
INCOMPATIBILITIES
The output is not readable by a parser but very good during the application development.
BUGS AND LIMITATIONS
not known
AUTHOR
Steffen Winkler
LICENSE AND COPYRIGHT
Copyright (c) 2009, Steffen Winkler <steffenw at cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.