Hello! Is there an option to translate date format? I am using different languages in my template, but date is shown in English only. Thank you.
khomutovspace Hi, yes that’s true. Support for other date languages is planned for a future release though.
khomutovspace Hi, the latest version includes now an additional locale parameter for the dateFormat string function. Therefore it is now possible to translate also days and month names in dates according to the locale.
@mad The returned string isn't utf-8 encoded, resulting in strange characters (e.g. for the german string for march: 'März'). It would be the best to encode the returned formatted string with utf8_encode().
Thank you very much!
blair Thanks for pointing this out! Will be fixed with the next release. 😊
Will this be fixed soon? 🙂
blair Hi there! To always encode the returned string unfortunately won’t work in every environment. I think the safest solution is to use the correctly encoded locale instead. Check out this comment. The correct locale for you would be de_DE.utf8 I guess.
Thank you! I didn't know that it is possible to encode the locale in PHP. Learned something 😀
I think it would be helpful to point that out in the 'dateFormat' section of the dev guide; maybe in one of the examples... 👍️
Powered by FreeFlarum.(remove this footer)