Is there a way to serve localized content from Content Fragment. For country and language. Like I have an hierarchy us/en/ and I have de/de. Is there any OOB functionality for the same?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @ShamliKh ,
No problem. In GraphQL, AEM provides a locale parameter that allows you to serve content based on the locale, but not specifically by country. The system processes the hierarchy from the last segment and serves the corresponding content as soon as it identifies a matching locale.
For example, if your content fragment is located under hierarchies such as us/en/ or hk/en/, it will serve the content for the en locale. Similarly, if the hierarchy is de/de/, it will recognize the latter de as the locale and return the content specific to Germany. Even if the hierarchy is in/de/, the system will only consider the latter part of the path and serve content accordingly.
{
carModelList(_locale: "de") {
items {
modelCd
}
}
}
Thanks,
Madhur Madan
Hi @Madhur-Madan ,
Sorry I might have missed it in my question but yes I want to know from an omnichannel perspective via GraphQL
Thanks,
Shamli
Hi @ShamliKh ,
No problem. In GraphQL, AEM provides a locale parameter that allows you to serve content based on the locale, but not specifically by country. The system processes the hierarchy from the last segment and serves the corresponding content as soon as it identifies a matching locale.
For example, if your content fragment is located under hierarchies such as us/en/ or hk/en/, it will serve the content for the en locale. Similarly, if the hierarchy is de/de/, it will recognize the latter de as the locale and return the content specific to Germany. Even if the hierarchy is in/de/, the system will only consider the latter part of the path and serve content accordingly.
{
carModelList(_locale: "de") {
items {
modelCd
}
}
}
Thanks,
Madhur Madan