2016-08-19 10:51:35 +12:00
|
|
|
<?php
|
|
|
|
|
2017-01-18 16:58:48 +13:00
|
|
|
namespace SilverStripe\i18n\Messages;
|
2016-08-19 10:51:35 +12:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows serialization of entity definitions collected through {@link i18nTextCollector}
|
|
|
|
* into a persistent format, usually on the filesystem.
|
|
|
|
*/
|
2017-01-18 16:58:48 +13:00
|
|
|
interface Writer
|
2016-08-19 10:51:35 +12:00
|
|
|
{
|
2016-11-29 12:31:16 +13:00
|
|
|
/**
|
2017-01-18 16:58:48 +13:00
|
|
|
* @param array $messages Map of entity names (incl. namespace) to default values. Values
|
|
|
|
* may be array format for pluralised values, or strings for normal localisations.
|
2016-11-29 12:31:16 +13:00
|
|
|
* @param string $locale
|
|
|
|
* @param string $path The directory base on which the collector should create new lang folders
|
|
|
|
* and files. Usually the webroot set through {@link Director::baseFolder()}. Can be overwritten
|
|
|
|
* for testing or export purposes.
|
|
|
|
*/
|
2017-01-18 16:58:48 +13:00
|
|
|
public function write($messages, $locale, $path);
|
2016-08-19 10:51:35 +12:00
|
|
|
}
|