Setting locale for Action Server using strftime

Hi,

I am using strftime to format a certain datetime object in a custom action. However, the locale is set to englisch and I need to set it to german (because I use %B to get the month). What is the best way to change the locale for the entire action server?

Of course, I can set the locale within the run-method of the action. Is this the best way to do it?

    def run(self, dispatcher: CollectingDispatcher,
            tracker: Tracker,
            domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
            locale.setlocale(locale.LC_TIME, "de_DE")

Thank you :slight_smile:

Mike