How were Experience Fragment language masters intended to be used? | Community
Skip to main content
Level 2
June 25, 2020
Solved

How were Experience Fragment language masters intended to be used?

  • June 25, 2020
  • 3 replies
  • 6111 views

I've seen experience fragments structured with language masters in a couple of places. One would be the documentation here:

https://docs.adobe.com/content/help/en/experience-manager-core-components/using/components/experience-fragment.html#localized-site-structure

In Sites, I can create live copies of my language masters; I don't see that as an option for XFs. One poster on stack overflow suggests that this is not possible:

https://stackoverflow.com/questions/62226751/live-copies-of-experience-fragment-aem-6-5

I haven't checked, but I suspect that the folder data type excludes the properties required to track live copies. Is there really no means to sync an XF to a language master?

Current best practice is to use XFs to normalize site headers and footers. The core XF component assumes page and XF structure mirror each other in order to perform localization, which means I've got at least two footer XFs per language (example: German language master, German in my regional Germany site, German in my regional Swiss site, etc) and no automated way to keep them in sync.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Himanshu_Singhal

Well, it's possible to create Live Copies for XF but it's possible to track it via Blueprint. The content sync feature applies b/w XF and it's live copies as well. 



And, of course, you got the part right about using it as header/footer for best practices. So, you can create the master copy for XF and create live copies for languages accordingly and keep it in Sync.  

3 replies

Himanshu_Singhal
Community Advisor
Himanshu_SinghalCommunity AdvisorAccepted solution
Community Advisor
June 25, 2020

Well, it's possible to create Live Copies for XF but it's possible to track it via Blueprint. The content sync feature applies b/w XF and it's live copies as well. 



And, of course, you got the part right about using it as header/footer for best practices. So, you can create the master copy for XF and create live copies for languages accordingly and keep it in Sync.  

Level 2
June 26, 2020
This isn't a solution - you can't leave the live copy in place and still have the core XF component find it. See Arun's comments below.
vanegi
Adobe Employee
Adobe Employee
June 25, 2020

Hello John,

You can create a variation of XF as a live copy and can keep these variations in sync with the use of Live Copy. See https://docs.adobe.com/content/help/en/experience-manager-learn/sites/experience-fragments/experience-fragments-feature-video-use.html for more details.

 

Thanks,

Vaishali

Level 2
June 25, 2020

Still no - you can create the variation as live copy, but it won't be where it needs to be for the core XF component will look for it. You need:

  • /content/experience-fragments/xxx/language-masters/fr/footer/master
  • /content/experience-fragments/xxx/ca/fr/footer/master (which is the live copy)
  • /content/experience-fragments/xxx/fr/fr/footer/master (which is another live copy)

Not:

  • /content/experience-fragments/xxx/language-masters/footer/master
  • /content/experience-fragments/xxx/language-masters/footer/fr_ca (??)
  • /content/experience-fragments/xxx/language-masters/footer/fr (??)

They aren't even in the same folder.

If you check the localization code in the component, you'll see it doesn't do anything fancy with variations to find the localized version of the XF - it's all just path manipulation. Which is why the docs say that the two structures need to mirror each other.

arunpatidar
Community Advisor
Community Advisor
June 25, 2020
Level 2
June 26, 2020
This does work, so thanks for that. But it is a bit of a hack. Because I need the paths and names to match up, I've got to create XFs I don't want, delete them, go to my language master, create an XF live copy with the wrong name, and move it to the place it needs to be while ensuring that I've got the correct name so that the core XF component can find it. Not looking forward to explaining this process to clients.
October 27, 2022

Hi @johnpurchase  can u explain it step by step. 

for one of our client we have one set of templates, based on it xf has been created for en-us, but we gonna implement MSM with multiple languages, but in my spanish language copy the XF is referring to en-us.

 

Since the XF path is configured in template i cannot have that changed as per language copy. If you clearly provide steps we can implement and try it.

 

requirement: MSM with different languages which has XF as well so we need language copies and live copies for pages and XF for each language we create.