Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
469 B
2
Indexable
Never
import os
import locale
from datetime import date

from kivy.app import App
from kivy.uix.label import Label

if os.name == "nt":
    local = "fra"
else:
    local = 'fr_FR.UTF-8'

locale.setlocale(locale.LC_ALL,local)

class CalendarApp(App):

    def build(self):
        # I'm french, I want this to return "janvier" in my app, not "january"
        return Label(text=date(2022, 1, 1).strftime('%B'))

if __name__ == "__main__":
    app = CalendarApp()
    app.run()