24 #require_once 'Zend/Locale.php'; 27 #require_once 'Zend/Translate/Adapter.php'; 38 private $_data = array();
47 $this->_options[
'delimiter'] =
";";
48 $this->_options[
'length'] = 0;
49 $this->_options[
'enclosure'] =
'"';
53 }
else if (func_num_args() > 1) {
54 $args = func_get_args();
56 $options[
'content'] = array_shift($args);
59 $options[
'locale'] = array_shift($args);
63 $opt = array_shift($args);
84 $this->_data = array();
86 $this->_file = @
fopen($filename,
'rb');
88 #require_once 'Zend/Translate/Exception.php'; 92 while(($data = fgetcsv($this->_file, $options['length
'], $options['delimiter
'], $options['enclosure
'])) !== false) { 93 if (substr($data[0], 0, 1) === '#
') { 97 if (!isset($data[1])) { 101 if (count($data) == 2) { 102 $this->_data[$locale][$data[0]] = $data[1]; 104 $singular = array_shift($data); 105 $this->_data[$locale][$singular] = $data; 117 public function toString()
_loadTranslationData($filename, $locale, array $options=array())
__construct($options=array())