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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Using 'website.selected_language' in liquid template

(0) ShareShare
ReportReport
Posted on by 130

Hi,

We have enabled additional portal languages and want to determine which language is currently selected within our web templates by using the liquid extension - website.selected_language.  This however is not returning any data.  Is there something else i need to do to get this working?

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at

    This page colinvermander.com/.../whats-new-in-dynamics-365-portals

    states that website.selected_language should actually work. Have you configure you page to use any of the languages?

    Then "pages.languages" should give you back a list of languages supported for that page. Have you checked that also?

  • Verified answer
    SP211 Profile Picture
    130 on at

    Just an update on this, using the following gives me the name of the currently selected language on the portal - {{ website.selected_language.Name }}

  • SP211 Profile Picture
    130 on at

    Thanks Andreas.  I was able to get the selected language by using {{ website.selected_language.Name }}

  • Birgit RD Profile Picture
    2 on at

    You can also use {{ website.selected_language.code }}. It does return 'en-US' in case we select English for te website language.

  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at

    A sample with {{ website.selected_language.code }}

    can be found here:

    docs.microsoft.com/.../liquid-objects

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans