- Have an empty site with at least en_US and es_ES locales enabled
- Create a basic web content
- Provide "Title" as title and "content" as content in en_US language, ensure friendlyURL is /title
- Change the language of the web content to es_ES. Provide "Título" as title and "contenido" as content in Spanish, ensure friendlyURL is /título.
- Publish the web content
- Create a display page to display "Basic web content". Add a text fragment and map it to the web content "content" field. Mark it as default display page
- Checkpoint 1: Create a widget page and add an asset publisher app to it. Click on the web content shown so that display page is rendered. Do the same but access the page with the Asset Publisher in Spanish by adding /es to the beginning of the URL path
- Checkpoint 2: Ensure that canonical URL takes you to the right content localization. http://localhost:8080/-/título and http://localhost:8080/-/title
- Note: you may get redirections depending on the value of locale.prepend.friendly.url.style property
- Try the 4 possible crossings between <language in the URL, friendly URL>
Observed: there are inconsistent results in terms of the chosen language to serve the content and also other elements in the page:
- http://localhost:8080/en/-/title serves everything in English (see en-es_and_en-en.png)
- http://localhost:8080/en/-/título serves everything in English (see en-es_and_en-en.png)
- http://localhost:8080/es/-/title serves the web content in English, but some elements in the page are in Spanish, other in English (see es-en.png)
- http://localhost:8080/es/-/título serves everything in Spanish (see es-es.png)
Expected: there are 2 possible interpretations in presence of language selector in the URL and a localized friendly URL:
- Language selector defines the page language, friendlyURL defines the web content language: http://localhost:8080/en/-/título would serve all the page in english but the web content itself in Spanish
- Language selector defines the language: http://localhost:8080/en/-/título would serve all the page in english, including the web content
Currently, notne of the above interpretations is applying.
Additional note: if user language is set to es_ES from my account settings, and http://localhost:8080/es/-/title is visited, there is a message about changing the page language:
In that message, if one clicks in "Mostrar la página en español" (Spanish for "Show the page in Spanish"), user is redirected to /es/web/guest/-/title where the message still remains.
Tested in master at 6d30aff6c2aebac750c630c0675d00eed025ca97