Calendar view and french translation

Hello,

I’m building a dashboard for the french public.
I would like to know how it is possible to change the format of the datepicker (from YYYY/MM/DD to DD/MM/YYYY) ?
Also is it possible to translate the calendar part ?

Thanks in advance.

Hi @Nabil_Servais,

Thanks for posting! Check out this thread.

You can use strftime from the Python datetime library to re-format the string any way you choose:

datetime — Basic date and time types — Python 3.12.0 documentation

That thread links to the documentation of datetime.date.strftime. Please read through their docs to learn how to change the format of the datepicker (from YYYY/MM/DD to DD/MM/YYYY).

There currently is no support to translate Streamlit widgets from English to French. Please submit a feature request in the Streamlit repo if you’d like for our engineers and community to consider it.

Caroline :balloon:

Hello,

Sorry, I don’t see your answer.
The thread doesn’t solve the issue at all.
The widget use english month and date format, for my users it’s an issue.

The format of date_input is not configurable. There is a Github issue about that, I encourage you to subscribe and upvote:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.