This method searches your "dictionary" for a translation. The easiest solution is a hash:print mt("Hello World!");
package MyNamespace::MT::German; ... sub mt { my ( $self, $phrase ) = @_; my %translations = ( 'Hello World!' => 'Hallo Welt!', ); return $translations{$phrase} || $phrase; );
In reply to Re: English to German
by lima1
in thread English to German
by kutty1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |