Import a language translations file
Available since version 3.0.181.
Usage
// basic usage
$bool = $languages->importTranslationsFile($language, string $file);
// usage with all arguments
$bool = $languages->importTranslationsFile($language, string $file, bool $quiet = false);
Arguments
Name | Type(s) | Description |
---|---|---|
language | Language, string | |
file | string | Full path to .csv translations file The .csv file must be one generated by ProcessWire’s language translation tools. |
quiet (optional) | bool | Specify true to suppress error/success notifications being generated (default=false) |
Return value
bool
int
Returns integer with number of translations imported or boolean false on error
Exceptions
Method can throw exceptions on error:
WireException
Languages methods and properties
API reference based on ProcessWire core version 3.0.236