Hey there
We have a table called AppointmentServices were services are stored with name and description. Now we try to make these services multilingual. This works fine with i18n behavior (TranslateBehavior).
After implementing this behavior “name” and “description” in the AppointmentServices are NULL. The values are only stored in i18n table. Which looks very strange. What is the correct way of also store the default values for “name” and “description” in the source table AppointmentServices?
We have found out that using the statement $this->AppointmentServices->locale(‘de_CH’); before saving a service entity does also store the values in the source table.
But this only works on our local servers (MAMP) the ->locale() is ignored on our server (Ubuntu 16.04.5 LTS)
What you experince is not the correct behaviour. That means you are missing something. Please read again the cookbook and find out what you are missing.
We have found a solution! In bootstrap.php there is also a setting for default_locale. This was set to App.defaultLocale. If we change it to de_CH the behavior is correct also on server.