Issue
- After changing the default language on a site and checking content fragments that include images, the content on existing pages is not displayed anymore if we change the translation.
Environment
- DXP 7.2
- DXP 7.3
Resolution
- This is the expected default behavior because every localized content (like Content Pages in this case) in Liferay works in the following way:
- Given a requested language, if the content is translated to the requested language, the content is displayed in the requested language.
- Given a requested language, if the content is not translated to the requested language, and the content is translated to the site's default language, the content is displayed in the site's default language.
- Given a requested language, if the content is not translated to the requested language, and the content is not translated to the site's default language, the content is not displayed.
Given the above 3 scenarios and the resulting behavior:
- The Content Page only has a translation for German
- The site's default language is English
- The requested language is German→scenario #1 applies
- The requested language is English→scenario #2 applies
- The requested language is Spanish→scenario #3 applies
Additional Information
- Changing the default language of the site also gives a warning about this: "This change will only affect the newly created localized content."
If the aim is to have English as the site default language and the image to be present in all untranslated languages, the image must be present on the Content Page's English translation. - We have a feature request for this that you can view here: LPS-142787
We encourage you to click on the "Start watching this issue" option to track the request for updates, and vote for it or share your thoughts in the comment section.