Getting list of page variants to display other language options, per page
Hey all,
How can i get the number and list of page variants I have for a particular page , so that I can display other language options (in the top menu or body), considering that having each page in multiple languages is optional.
So, in a page for DK, I want to show that that page has a translation to EN (automatically the other way around will work as well, same page, EN to DK) and in another page, I only show the DK version, because it was not yet translated and published into EN (or any other language).
Getting list of page variants to display other language options, per page
Hey all,
How can i get the number and list of page variants I have for a particular page , so that I can display other language options (in the top menu or body), considering that having each page in multiple languages is optional.
So, in a page for DK, I want to show that that page has a translation to EN (automatically the other way around will work as well, same page, EN to DK) and in another page, I only show the DK version, because it was not yet translated and published into EN (or any other language).
Thanks,
Hi,
We can use below code to fetch Multi Languages:-
However, you need to ensure that domains are already setup as per below screenshot for them to work.
Further I would suggest to add Fallback language to provide better content flexibility.
@Model.Value("pageTitle", "fr", fallback: Fallback.ToLanguage)
This link is useful. https://our.umbraco.com/documentation/Getting-Started/Design/Rendering-Content/
Hope this helps you.
Hi Luis,
This is what I did. I need to show a shore site name for each culture I have.
is working on a reply...