createFile()
createFile(array $lang, array $locales, string $file) : void
Create an XML language file from an array of data.
The format of the parameters should be as follows:
$lang = [ 'src' => 'en', 'output' => 'de', 'name' => 'German', 'native' => 'Deutsch' ];
$locales = [ [ 'region' => 'DE', 'name' => 'Germany', 'native' => 'Deutschland', 'text' => [ [ 'source' => 'This field is required.', 'output' => 'Dieses Feld ist erforderlich.' ], ... ] ], ... ];
Parameters
array | $lang | |
array | $locales | |
string | $file |
Throws
- \Pop\I18n\Format\Exception