lithium\g11n\catalog\adapter\Gettext::_files()

protected method

Returns absolute paths to files according to configuration.

Parameters

  • string $category
  • string $locale
  • string $scope

Returns

array

Source

	protected function _files($category, $locale, $scope) {
		$path = $this->_config['path'];
		$scope = $scope ?: 'default';

		if (($pos = strpos($category, 'Template')) !== false) {
			$category = substr($category, 0, $pos);
			return ["{$path}/{$category}_{$scope}.pot"];
		}

		if ($category === 'message') {
			$category = 'messages';
		}
		$category = strtoupper($category);

		return [
			"{$path}/{$locale}/LC_{$category}/{$scope}.mo",
			"{$path}/{$locale}/LC_{$category}/{$scope}.po"
		];
	}