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 :
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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans