web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

How to switch the language of a portal programatically or by url parameter?

(0) ShareShare
ReportReport
Posted on by

We have a portal site, that is embedded via iframe inside a typo3 website. We want the portal inside the iframe to show the content in the same language as the parent typo3 page does. Therefore we planned to pass a url parameter to the portal page inside the iframe, i.e. "?lcid=1031" or "?lang=en". Inside the portal page we then want to process the url parameter and switch the language. But how to do this? I didn't find any documentation about that topic and it is not quite obvious what that default language switcher control does.

0361.Capture.JPG

What happens technically when another language is selected and how to emulate that behavior manually? Is there maybe an official url parameter that can be used?

I have the same question (0)
  • Community Member Profile Picture
    on at

    Oh, I found something. It's handled by a cookie.

    4137.Untitled.jpg

    Would it be a supported implementation to set that cookie manually? I will try to do this in the liquid code, so there hopefully is no need for a reload inside the iframe.

  • Community Member Profile Picture
    on at

    Nah, for non-Marketing-portals "ContextLanguageCode" seems to be the right cookie. Setting it to either "en-US" or "de-DE" and so on successfully changes the language after refreshing the page. Supported?

  • Suggested answer
    Community Member Profile Picture
    on at

    Now I have it. There is a website setting called "MultiLanguage/DisplayLanguageCodeInURL". If it is "true" then you can swtich languages by extending the url by "/de-DE" or "/en-US" and so on.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Dynamics 365 general

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans