Expand my Community achievements bar.

SOLVED

How to configure Experience Fragments for multi language sites?

Avatar

Level 4

How can we make a particular language copy of the main site refers/use the respective Experience Fragments in a similar language/folder structure? Docs here https://experienceleague.adobe.com/docs/experience-manager-core-components/using/get-started/localiz... states they are picked automatically if the structure is similar. But we are having issues - the language copy of the website also shows XF's from main /us/en instead of XF's language-copy.

How can we solve this?

 

Setup: 

We have the main site as:

my-site.com <-- /content/my-site/us/en/ <--- and Experience Fragments (Header & Footer) /content/experience-fragments/my-site/us/en/site/header

 

Created a language copy as:

my-site.com/nl <-- /content/my-site/nl/nl/ <--- and Experience Fragments (Header & Footer) /content/experience-fragments/my-site/nl/nl/site/header

 

Added rewrites in Dispatcher as 

...
# rewrite for root redirect
RewriteRule ^/?$ /content/${CONTENT_FOLDER_NAME}/us/en/home.html [PT,L]

# rewrite for Dutch - nl 
RewriteRule ^/nl?$ /content/${CONTENT_FOLDER_NAME}/nl/nl/home.html [PT,L]
...
RewriteCond %{REQUEST_URI} !^/nl
..
RewriteRule ^/nl(.*)$ /content/${CONTENT_FOLDER_NAME}/nl/nl/$1 [PT,L]

 

But the language copy my-site.com/nl also shows the Experience Fragments from /content/experience-fragments/my-site/us/en/ instead of /content/experience-fragments/my-site/nl/nl 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Him

Use core experience component instead of foundation XF component to achieve localisation with XF, 

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/experien... 



Arun Patidar

View solution in original post

3 Replies

Avatar

Community Advisor

Did you write any custom rollout for having the locale URLs for component level

If not make sure those rollout are available so that all the configured URL will map to respective experience fragments

 

Avatar

Correct answer by
Community Advisor

Him

Use core experience component instead of foundation XF component to achieve localisation with XF, 

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/components/experien... 



Arun Patidar

Avatar

Level 4

Thanks @arunpatidar 

We are using Core Components XF. And that should have picked the correct ones.

 

The issue for us is that we were using custom site properties to pick the Header, Footer and other XF's. Now it is resolved for us.

Screen_Shot_2022-11-10_at_1_41_14_PM.png