(Partial) Map for day in DateTime item

Hi all,
I would like to format a DateTime item like this:

DateTime  Date_actual             "Datum/Zeit [%1$ta, %1$td.%1$tm.%1$tY %1$tH:%1$tM]"

That works and shows the day of week in locale (default english):
Tue, 23.05.2017 10:16
That’s fine so far, but I would like to get the day of week in german.
I don’t want to change the locale to get errors in english (better for forum support…:slight_smile:)
So I tried

DateTime  Date_actual             "Datum/Zeit [MAP(weekdays_de.map):%1$ta, %1$td.%1$tm.%1$tY %1$tH:%1$tM]"


DateTime  Date_actual             "Datum/Zeit [MAP(weekdays_de.map):%1$ta][, %1$td.%1$tm.%1$tY %1$tH:%1$tM]"

but this does not work.
I could add a rule to format the item, but is there an easier way for a (partial) map of a DateTime item?

I don’t think you can do this without a rule. The problem is that the MAP operates on the entire state of the Item, not just the parts. I don’t think you can pass the formatted part of the Item’s state to MAP.

There might be something clever one could do with a JavaScript transform but I’m not certain. I’d just write a rule.

If you want german weekdays (and also months) just set the locales (LC_ALL, LANG, LANGUAGE) to de_DE.utf-8 for the openhab user, there is no need for mapping the weekdays.

Thanks Rich, Udo.
Udo, when changing the locales, aren’t all other things (f.e. error messages) also in german?
That might be bad to tell the correct error in english for (forum) support…

No, it’s only UI :slight_smile: (I think, more or less it’s only date conversion and maybe comma instead of period)

If you want to avoid a completely localized linux, you can set the locale within the openHAB ‘start sequence’

Well, formally this was easy, just set LANG right before starting the java command… but I’m pretty sure this is still possible…