Definition at line 41 of file Xliff.php.
◆ _loadTranslationData()
_loadTranslationData |
( |
|
$filename, |
|
|
|
$locale, |
|
|
array |
$options = array() |
|
) |
| |
|
protected |
Load translation data (XLIFF file reader)
- Parameters
-
string | $locale | Locale/Language to add data for, identical with locale identifier, see Zend_Locale for more information |
string | $filename | XLIFF file to add, full path must be given for access |
array | $option | OPTIONAL Options to use |
- Exceptions
-
Zend_Translation_Exception | |
- Returns
- array
Definition at line 66 of file Xliff.php.
68 $this->_data = array();
70 #require_once 'Zend/Translate/Exception.php'; 74 if (empty($options['useId
'])) { 75 $this->_useId = false; 80 $encoding = $this->_findEncoding($filename); 81 $this->_target = $locale; 82 $this->_file = xml_parser_create($encoding); 83 xml_set_object($this->_file, $this); 84 xml_parser_set_option($this->_file, XML_OPTION_CASE_FOLDING, 0); 85 xml_set_element_handler($this->_file, "_startElement", "_endElement"); 86 xml_set_character_data_handler($this->_file, "_contentElement"); 89 Zend_Xml_Security::scanFile($filename); 90 } catch (Zend_Xml_Exception $e) { 91 #require_once 'Zend/Translate/Exception.php
'; 92 throw new Zend_Translate_Exception( 97 if (!xml_parse($this->_file, file_get_contents($filename))) { 98 $ex = sprintf('XML error: %s at line %d of file %s
', 99 xml_error_string(xml_get_error_code($this->_file)), 100 xml_get_current_line_number($this->_file), 102 xml_parser_free($this->_file); 103 #require_once 'Zend/Translate/Exception.php
'; 104 throw new Zend_Translate_Exception($ex);
◆ toString()
Returns the adapter name
- Returns
- string
Definition at line 240 of file Xliff.php.
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Translate/Adapter/Xliff.php