web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: Using 'website.selected_language' in liquid template

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

    can be found here:

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

  • Birgit RD Profile Picture
    2 on at
    RE: Using 'website.selected_language' in liquid template

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

  • SP211 Profile Picture
    130 on at
    RE: Using 'website.selected_language' in liquid template

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

  • Verified answer
    SP211 Profile Picture
    130 on at
    RE: Using 'website.selected_language' in liquid template

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

  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at
    RE: Using 'website.selected_language' in liquid template

    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?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#3
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans