 | The Module
# check that the name of the document is not a manual_template name if (is_manual_template_name($template_name)) { my $message = $msg->get("MISUSE_OF_MANUAL_TEMPLATE_NAME", { name => "$template_name"} ); $log->write($message, 5); return 0; }
|
The next thing we do is to load a dictionary from the phrasebook file. The $language variable above will hold the dictionary name - in our example, it will be "EN" or "NL".
Finally, when we need to get the text for an error message, we call the get method of the Class::Phrasebook object with the key of the message we want to get, and a reference to a hash that holds the name-value pairs of the placeholders within the phrase. |