How can I use the Python's "Locale" library on Replit?

I’ve got an error while using Locale library on Teplit. I need to set my environment to Brazilian environment, to use Flet’s DatePicker…
Repl link/Link to where the bug appears:
The bug appears when I set Locale to Brazilian environment:

Screenshots, links, or other helpful context:

When I set this following command:

import locale as l

I get the following error:

 File "/home/runner/atelierdalci/", line 18, in <module>
  File "/nix/store/xf54733x4chbawkh1qvy9i1i4mlscy1c-python3-3.10.11/lib/python3.10/", line 620, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Hello @fotografiadmd!

The local package returned an error because the location is unsupported. Please also note that your repls run on Replit servers, which are always in the same place.

Ok, I know the server is always at the same place, Lol.
But Locale was created exactly to change the country / locale parameters without influence the server parameters.

1 Like