ePages 6.11.0 - DE_EPAGES/Dictionary/API/XML/DictionaryImportHandler.pm

Package DE_EPAGES::Dictionary::API::XML::DictionaryImportHandler

This module implements a SAX2 handler to import dictionary files.

Base
DE_EPAGES::XML::API::BaseImportHandler
Example
<?xml version="1.0" encoding="iso-8859-1"?>
<epages>
  <Language Language="de">
    <Translation Keyword="Language" Value="Sprache" />
  </Language>
</epages>
...
use DE_EPAGES::Dictionary::API::XML::DictionaryImportHandler qw (ImportDictionary);
my $hhDictionary = ImportDictionary('Dictionary.en.xml');
@EXPORT_OK
ImportDictionary

Functions

ImportDictionary

ImportDictionary

Imports dictionary from an XML file. If a dictionary exists the function extends this dictionary.

Syntax
$hDictionary = ImportDictionary( $FileName );
$hDictionary = ImportDictionary( $FileName, $hExistingDictionary );
$hDictionary = ImportDictionary( $FileName, $hExistingDictionary, $LanguageCode );
$hDictionary = ImportDictionary( $FileName, $hExistingDictionary, $LanguageCode, $OnlyJS );
Input
$FileName (string)
XML file name
$hExistingDictionary (ref.hash.hash)
(optional) existing dictionary
$LanguageCode (string)
(optional) ISO-639 language code, e.g. 'en'
$OnlyJS (boolean)
(optional, dault=false) read ony translation tags that are
marked with the JS="1" attribute
Return
$hDictionary (ref.hash.hash)
imported dictionary