Set multiple language values at once
Available since version 3.0.236.
Example
$page->title->setLanguageValues([
'default' => 'Hello world',
'es' => 'Hola Mundo',
'fr' => 'Hei maailma',
]);
Usage
// basic usage
$self = $languagesPageFieldValue->setLanguageValues(array $values);
// usage with all arguments
$self = $languagesPageFieldValue->setLanguageValues(array $values, bool $reset = false);
Arguments
Name | Type(s) | Description |
---|---|---|
values | array | Associative array of values where keys are language names or IDs. |
reset (optional) | bool | Reset any languages not specified to blank? (default=false) |
Return value
self
LanguagesPageFieldValue methods and properties
API reference based on ProcessWire core version 3.0.236