Find all translation(s) for given text
Scans all textdomains to find translations.
Available since version 3.0.237.
Usage
// basic usage
$array = $languageTranslator->findTranslations(string $text);
// usage with all arguments
$array = $languageTranslator->findTranslations(string $text, $context = '', array $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
text | string | |
context (optional) | string, array |
|
options (optional) | array |
|
Return value
array
- Returns array of strings containing translations of given text.
- Returns array of arrays, each with verbose info, if getInfo option requested.
LanguageTranslator methods and properties
API reference based on ProcessWire core version 3.0.244