Given a source file to translate, create a new textdomain
Usage
// basic usage
$string = $languageTranslator->addFileToTranslate(string $filename);
// usage with all arguments
$string = $languageTranslator->addFileToTranslate(string $filename, bool $filenameIsTextdomain = false, bool $save = true);
Arguments
Name | Type(s) | Description |
---|---|---|
filename | string | Filename or textdomain that we will be translating, relative to site root. |
filenameIsTextdomain (optional) | bool | Specify true if $filename is a textdomain instead. |
save (optional) | bool | Whether to save the language |
Return value
string
bool
Returns textdomain string if successful, or false if not.
LanguageTranslator methods and properties
API reference based on ProcessWire core version 3.0.244