I22r::Translate::Request - translation request object
Internal translation request object for the I22r::Translation distribution. If you're not developing a backend or a filter for this distribution, you can stop reading now.
Otherwise, you'll just need to know that a new I22r::Translate::Request object is created when you call one of the I22r::Translate::translate_xxx methods.
I22r::Translate::Request
The source and target languages for the translation request.
A hash reference whose values are the source strings to be translated. If the request was created from a translate_string or translate_list call, the inputs are still put into a hash reference.
translate_string
translate_list
All other inputs to I22r::Translate::translate_xxx are put into a configuration hash for the request, accessible through the _config method.
I22r::Translate::translate_xxx
_config
A special method that examines the current request's configuration, configuration for the current backend (see "backend"), and the global configuration from I22r::Translate.
Get or set the name of the active backend. The I22r::Translate translation process will iterate through available, qualified backends until all of the inputs have been translated.
I22r::Translate
A hashref for translation results. Each key should be the same as a key in $request->text, and the value is an I22r::Translate::Result object.
If you are writing a new filter, you will want your apply method to operate on an element of $request->text (say, $request->text->{$key}, and your unapply method to operate on the corresponding $request->results->{$key}->text.
apply
$request->text
$request->text->{$key}
unapply
$request->results->{$key}->text
In a backend, you'll want to pass the values in $request->text the translation engine, and populate $request->results with the results of the translation.
$request->results
To install I22r::Translate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm I22r::Translate
CPAN shell
perl -MCPAN -e shell install I22r::Translate
For more information on module installation, please visit the detailed CPAN module installation guide.