I am creating a new multi-lingual site and the documentation does not explain the difference between the options in the translation method dropdown.
What is different for each of these and when is it recommended to choose the from the options?
I am creating a new multi-lingual site and the documentation does not explain the difference between the options in the translation method dropdown.
What is different for each of these and when is it recommended to choose the from the options?
The field will always have the same value for each site
Easy: the field can have a different value for each of your sites. Create 10 sites, all can have different content
Every site group can have a different value, create 10 site that are all in the same group, all elements will have the same value, create a site in another group -> that one can have a different value than the other 10
Create 10 sites, all in the same language, all will have the same content, no matter what group they are in. Create another site in another language -> this one can have different content
You can define custom behaviors
edit a few more words about this
There will appear an <input>
below that option and Craft will actually do this
if ($field->getTranslationKey($siteElement) === $field->getTranslationKey($element)) {
// Copy the master element's value over
$siteElement->setFieldValue($field->handle, $element->getFieldValue($field->handle));
}
Which basically means: it will render both object templates (the original element, and the element for all other sites) and injects the element
into the template..
For example if you have something like { title }
in your template, Craft will render those templates, and will compare them. If the titles are the same, the field is translatable and may contain a different value for all sites, if the titles are equally, the content of your field will be equally as well.