I am writing a spring boot application using Thymeleaf as template engine.
Need to localize month translation of displayed date into Ukrainian:
Expected result 10-квітня-2021 18:58:53 is displayed after switching the language
In general localization (EN/UA) works fine.
I tried the following tips, but dates are still displayed in English after switching the language (i.e. 10-April-2021 18:58:53):
<table class="table table-bordered table-striped ">
<thead class="thead-dark">
<tr>
...
<th></th>
</tr>
</thead>
<tbody>
<tr th:each="tempReport : ${page}">
...
<td th:text="${#temporals.format(T(java.time.LocalDate).of(#dates.year(tempReport.reportDate),
#dates.month(tempReport.reportDate), #dates.day(tempReport.reportDate)), 'dd-MMMM-yyyy', new java.util.Locale('ua', 'UA'))}"></td>
</tr>
</tbody>
</table>
and this
...
<td th:text="${T(org.thymeleaf.util.DateUtils).monthName(#dates.createNow(), #locale)}"></td>
...
Also tried this code, and it works
...
<td th:text="${T(org.thymeleaf.util.DateUtils).monthName(#dates.createNow(), #locale.GERMAN)}"></td>
...
but the problem is there is NO UKRAINIAN constant for this approach, like #locale.UKRAINIAN
My date in POJO class:
@Column(name = "report_date")
@Temporal(TemporalType.DATE)
@DateTimeFormat(pattern = "dd/MM/yyyy")
@NotNull
private Date reportDate;
Any help to resolve the issue will be appreciated!