@@ 116-128 (lines=13) @@ | ||
113 | * Path to gettext locales directory relative to APPPATH |
|
114 | * @return $this |
|
115 | */ |
|
116 | private function _bindTextDomain() |
|
117 | { |
|
118 | $isBindTextDomain = bindtextdomain($this->_textDomain, APPPATH . $this->_localeDir); |
|
119 | ||
120 | log_message( |
|
121 | (is_string($isBindTextDomain) ? 'info' : 'error'), |
|
122 | 'Gettext Library -> Bind ' . |
|
123 | 'text domain: ' . $this->_textDomain . ' - ' . |
|
124 | 'with directory: ' . APPPATH . $this->_localeDir |
|
125 | ); |
|
126 | ||
127 | return $this; |
|
128 | } |
|
129 | ||
130 | /** |
|
131 | * Gettext domain |
|
@@ 187-197 (lines=11) @@ | ||
184 | * MO file exists for locale |
|
185 | * @return $this |
|
186 | */ |
|
187 | private function _checkLocaleFile() |
|
188 | { |
|
189 | $file = APPPATH . $this->_localeDir . '/' . $this->_locale . '/LC_MESSAGES/' . $this->_textDomain . '.mo'; |
|
190 | ||
191 | log_message( |
|
192 | (is_file($file) === TRUE ? 'info' : 'error'), |
|
193 | 'Gettext Library -> Check MO file exists: ' . $file |
|
194 | ); |
|
195 | ||
196 | return $this; |
|
197 | } |
|
198 | } |
|
199 | ||
200 | /* End of file Gettext.php */ |