lithium\g11n\catalog\adapter\Gettext::write()
Overrides
lithium\g11n\catalog\Adapter::write()
Writes data.
Parameters
-
string
$category
A category.
-
string
$locale
A locale identifier.
-
string
$scope
The scope for the current operation.
-
array
$data
The data to write.
Returns
booleanSource
public function write($category, $locale, $scope, array $data) {
$files = $this->_files($category, $locale, $scope);
foreach ($files as $file) {
$method = '_compile' . ucfirst(pathinfo($file, PATHINFO_EXTENSION));
if (!$stream = fopen($file, 'wb')) {
return false;
}
$this->invokeMethod($method, array($stream, $data));
fclose($stream);
}
return true;
}