Configuring translations for Acquia Cohesion
To use translation with Acquia Cohesion you need to configure your website with the following settings:
Enable the Content translation module
- Navigate to Extend
- Enable the Content Translation module.
Configure entities and bundles to be translated
Ensure you understand and follow step 4. Failure to do so can cause significant issues and potential data loss.
- Navigate to Configuration > Regional and Language > Content language and translation
- Select the entities types to translate. For example select Content
- Scroll down and enable the bundles to translate. For example Basic Page.
Uncheck the Layout canvas field against each bundle you have enabled.
You must follow this step because you don't want to translate the field, but the underlying entity. Failure to follow this step before translating content will result in content referencing multiple Layout canvas entities which can result in potential loss of data.
- Enable translation for the Layout canvas entity type
- Check Hide non translatable fields on translation forms.
Layout canvas field settings
When configuring the Layout canvas field on an entity type the "Users may translate this field" checkbox must be unchecked. This is because the Layout canvas itself needs to be translated not the Layout canvas field on an entity type.
Failure to follow this step before translating content will result in content referencing multiple Layout canvas entities which can result in potential loss of data.
When reverting a piece of content that has non translatable fields, you will be asked to if you want to "Revert content shared across translations". When using the Acquia Cohesion layout canvas field you should always check it or implement 'hook_entity_bundle_info_alter' so it's always checked. You can find more information here: https://www.drupal.org/node/2938191