FelixArt / schaukasten

0 stars 1 forks source link

add translation of event titles into english #2

Open FelixArt opened 1 year ago

dominikgeissler commented 1 year ago

I wouldn't do it programmatically since these translations would most likely suck. Maybe just store some human-made translations somewhere?

i.e.

translations = {
    "Deutscher Name": "english translation",
    # ...
}

# just schematics
for event in events:
    if lang == "de":
        add_event(event.title)
    else:
        event_title = event.title
        if event.title in translations:
            event_title = translations[event.title]
        else:
            print(f"No translation found for {event.title}. Using german name")
        add_event(event_title)
FelixArt commented 1 year ago

Yes that's the best way probably