Selecting language within Snippets for dates, currencies etc

Hi there,

in my daily communications, I frequently need to switch between languages (EN and DE). I can set the language centrally, of course, but I would love to set the language within the snippets case-by-case, especially for the names of the months and days, e.g. March (EN) vs. März (DE), Monday (EN) vs. Montag (DE).

I do not think that this is possible at the moment, right?

Best,
Thomas

Hi!

You could probably do something like this.

{button: language = "english"
; label=EN}{button: language = "german"
; label=DE}{note: preview=no}{formmenu: default=english; german; name=language}{weekdays=[D1, D2, D3, D4, D5]}
{if: language = "english"}{D1="Monday"}{D2="Tuesday"}{D3="Wednesday"}{D4="Thursday"}{D5="Friday"}{else}{D1="Montag"}{D2="Dienstag"}{D3="Mittwoch"}{D4="Donnerstag"}{D5="Fritag"}{endif}{endnote}

{formmenu: values={=weekdays}}

{=D1}
{=D2}
{=D3}
{=D4}
{=D5}

2 Likes

You can also set the locale directly on {time} commands.

For example:

English: {time: LLLL; locale=en}
German: {time: LLLL; locale=de}

2 Likes

Ahh! Awesome- Thank you! This is quite a lifesaver!