FormatDateTime culture in incorrect language for a certain culture

Bram Verstaen asked on March 14, 2022 15:04

On our client's website, there's a blog posts page.

This page contains a repeater web part. In this web part, there's a transformation that transforms the 'created' datetime field from individual blog post fields to something like this: 15 November 2021

This is being executed correctly for all cultures (including en-gb and en-us). But for the English global (gd-gb) culture, it shows the date like this (which seems to be Scottish) 15 dhen t-Samhain 2021

In the transformation, this is transformation method for displaying the date: {% FormatDateTime(created, "dd MMMM yyyy") %}

We've checked and the {%CurrentDocument.DocumentCulture#%} correctly contains gd-gb as a culture.

Would anyone know how to correct this?

Recent Answers


Swapna Narayandas answered on March 16, 2022 08:51

Just wondering that the culture code is "en-gb" or "gd-gb". Please check the culture code.

0 votesVote for this answer Mark as a Correct answer

Bram Verstaen answered on March 21, 2022 10:17

Thank you for your response.

It did involve the 'gd-gb' culture (as we also have 'en-gb' on this site).

We ended up working around it by conditionally formatting the date like this "15/11/2021" when the LocalizationContext.CurrentCulture.CultureCode == "gd-GB" in the repeater web part's Text/XML transformation.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.