Hi all,
I am having a problem with translation-behavior on CakePHP 3.10.
My view:
<?php
echo $this->Form->control('name');
echo $this->Form->control('_translations.en.name')]);
?>
If I add a new entity, the “name”-field in my base-table and an entry with the locale “en” in the i18n-table is saved. This is what I expected.
When I edit the “name” and leave the “_translations.en.name”-field untouched, a new entry in the i18n-table with my standard locale “de” is generated.
When I delete this record from the i18n-table and edit the entity once again - but this time with changes to “name” and “_translations.en.name” - the “name”-field and the “en”-locale in the i18n-table is updated and no extra “de”-locale-field is generated in the i18n-table. How can I achieve this even when I leave the “_translations.en.name”-field unchanged? Is this the intended behavior or am I doing something wrong?
What I expected:
I have a default-language and the translation of this default-language is saved in the model. Every new translation in different languages is saved in the i18n-table.
Thanks for your help.
Regards
Tobi.