How can I change the language?

Thank you for your answers of my question about the date format!!!
But how can I change the language?

#set text(lang: "de")

doesn’t work.)?)

Thanks a lot.

PS. I’m a totally novice to Typst.

Hello @Thomas, see Can I display the long form of a month in datetime display in a language other than english? - #2 by Fumnanya

I think this is very complicated compared to LaTeX or ConTeXt.
And I wouldn’t know how to bring this together with the answers on date formatting.

I believe you would also use a package in LateX or ConTeXt.
Regardless, if you modify the function in the previous topic, you can directly use icu-datetime formatting function in the last time.
e.g.?

#let day = datetime(
  year: 2024,
  month: 5,
  day: 31,
)
#fmt-date(day, locale: "km", length: "full") 

See the docs for more details!

Thanks for your help, I finally got it right!
In ConTeXt, for example, you just write
mainlanguage[nl] (or mainlanguage[de] …)
That’s all!

1 Like

Great! yes, unfortunately atm, dates are not locale aware. It’s a pending issue and should be solved at some point.