The adapter works with the directory structure below. The example shows the structure for the directory as given by the 'path' configuration setting. It closely ressembles the standard gettext directory structure with a few slight adjustments to the way templates are being named. {{{ resources/g11n/po ├── | ├── LC_MESSAGES | | ├── default.po | | ├── default.mo | | ├── .po | | └── .mo | ├── LC_VALIDATION | | └── ... | └── ... ├── | └── ... ├── message_default.pot ├── message_.pot ├── validation_default.pot ├── validation_.pot └── ... }}}
См. также: lithium\g11n\Locale
Наследование: extends lithium\g11n\catalog\Adapter
Пример #1
0
 protected function _files($category, $locale, $scope)
 {
     $files = parent::_files($category, $locale, $scope);
     foreach ($files as $key => $file) {
         $extension = pathinfo($file, PATHINFO_EXTENSION);
         if (!$this->mo && $extension == 'mo' || !$this->po && $extension == 'po') {
             unset($files[$key]);
         }
     }
     return $files;
 }