Definition at line 41 of file Tbx.php.
◆ _loadTranslationData()
_loadTranslationData |
( |
|
$filename, |
|
|
|
$locale, |
|
|
array |
$options = array() |
|
) |
| |
|
protected |
Load translation data (TBX file reader)
- Parameters
-
string | $filename | TBX file to add, full path must be given for access |
string | $locale | Locale has no effect for TBX because TBX defines all languages within the source file |
array | $option | OPTIONAL Options to use |
- Exceptions
-
Zend_Translation_Exception | |
- Returns
- array
Definition at line 61 of file Tbx.php.
63 $this->_data = array();
65 #require_once 'Zend/Translate/Exception.php'; 69 $encoding = $this->_findEncoding($filename); 70 $this->_file = xml_parser_create($encoding); 71 xml_set_object($this->_file, $this); 72 xml_parser_set_option($this->_file, XML_OPTION_CASE_FOLDING, 0); 73 xml_set_element_handler($this->_file, "_startElement", "_endElement"); 74 xml_set_character_data_handler($this->_file, "_contentElement"); 77 Zend_Xml_Security::scanFile($filename); 78 } catch (Zend_Xml_Exception $e) { 79 #require_once 'Zend/Translate/Exception.php
'; 80 throw new Zend_Translate_Exception( 85 if (!xml_parse($this->_file, file_get_contents($filename))) { 86 $ex = sprintf('XML error: %s at line %d of file %s
', 87 xml_error_string(xml_get_error_code($this->_file)), 88 xml_get_current_line_number($this->_file), 90 xml_parser_free($this->_file); 91 #require_once 'Zend/Translate/Exception.php
'; 92 throw new Zend_Translate_Exception($ex);
◆ toString()
Returns the adapter name
- Returns
- string
Definition at line 176 of file Tbx.php.
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Translate/Adapter/Tbx.php