@@ 130-142 (lines=13) @@ | ||
127 | * Path to gettext locales directory relative to APPPATH |
|
128 | * @return $this |
|
129 | */ |
|
130 | private function _bindTextDomain() |
|
131 | { |
|
132 | $isBindTextDomain = bindtextdomain($this->_textDomain, APPPATH . $this->_localeDir); |
|
133 | ||
134 | log_message( |
|
135 | (is_string($isBindTextDomain) ? 'info' : 'error'), |
|
136 | 'Gettext Library -> Bind ' . |
|
137 | 'text domain: ' . $this->_textDomain . ' - ' . |
|
138 | 'with directory: ' . APPPATH . $this->_localeDir |
|
139 | ); |
|
140 | ||
141 | return $this; |
|
142 | } |
|
143 | ||
144 | /** |
|
145 | * Gettext domain |
|
@@ 212-222 (lines=11) @@ | ||
209 | * MO file exists for locale |
|
210 | * @return $this |
|
211 | */ |
|
212 | private function _checkLocaleFile() |
|
213 | { |
|
214 | $file = APPPATH . $this->_localeDir . '/' . $this->_locale . '/LC_MESSAGES/' . $this->_textDomain . '.mo'; |
|
215 | ||
216 | log_message( |
|
217 | (is_file($file) === TRUE ? 'info' : 'error'), |
|
218 | 'Gettext Library -> Check MO file exists: ' . $file |
|
219 | ); |
|
220 | ||
221 | return $this; |
|
222 | } |
|
223 | } |
|
224 | ||
225 | /* End of file Gettext.php */ |