Mam problem z tłumaczeniem na język angielski, nie widzę tłumaczeń, tylko cały czas język polski. To moje ustawienia:
i18n
spring.messages.basename=languages/messages
spring.messages.encoding=UTF-8
spring.messages.fallback-to-system-locale=false
spring.thymeleaf.encoding=UTF-8
Przykładowy html:
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <title th:text="#{login.label}" /> <link rel="shortcut icon" href="/images/favicon.ico"> <link rel="stylesheet" href="/css/main.css" type="text/css" /> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous"> </head> <body>
<center></center>
<form th:action="@{/login}" method="post" class="login-form">
</body>
</html>
![screenshot-20210608170948.png](https://4programmers.net/uploads/113219/NXSsxB5uivQ04vuJeZqEzLbEFNkQU0Qq3kuvDqTb.png)
<div th:if="${param.logout}" class="alert alert-danger">
<span th:text="#{login.loggedOut}"></span>
</div>
<div th:if="${param.error}" class="alert alert-danger">
<span th:text="#{login.error}"></span>
</div>
<div class="form-group">
<label for="username"></label>
<input id="username" type="text" name="username" class="form-control" autofocus/>
</div>
<div class="form-group">
<label for="password"></label>
<input id="password" type="password" name="password" class="form-control"/>
</div>
<div class="mt-3">
<button type="submit" class="btn btn-primary" th:text="#{login.label}"></button>
</div>
</form>
login = logowanie
login.label = Zaloguj się
login.error = Błędny login lub hasło
login.logout = Poprawnie Cię wylogowano
login.loggedOut = Poprawnie Cię wylogowaliśmy