Hi team,
I’m launching Answers for a German client. In many European languages, it’s common to display the time of day in military time/the 24-hour system, rather than using AM/PM.
For example:
Is there a way to universally get hours to display using the 24-hour system for a non-English Answers site? Alternatively, can you recommend an approach how to override the hours and date range formatting for the location and event cards pictured below?
Many thanks!
Max
Hi Max,
Sure, this is fairly easy to do.
-
You’ll need to override the formatters.js file that is in the theme. To do this you’ll go to Tools > Jambo Commands and select Override Theme. You’ll then want to select the static/js/formatters.js
file.
-
Search the file for isTwentyFourHourClock
and switch from false
to true
.
Keep in mind that when you override the theme, you are shadowing the file and you won’t get any of the formatter updates automatically when you upgrade the theme in the future. If we add any new formatters to the theme, you would just want to copy and paste them into your formatters.js file in order to take advantage.
Hope that helps!