I have a problem about adding the language part into the existing URL after changing Language in Spring Boot
Here is my URL listing all brands by name in ascending order.
admin/brands/page/1?sortField=name&sortDir=asc
When I change the language, the URL has occured as shown below.
admin/brands/page/1?lang=fr
Here is my language change code snippets in thymeleaf shown below.
<li class="nav-item">
<a class="nav-link" th:href="@{?lang=en}">
<img th:src="@{/images/english.png}" width="30">
</a>
</li>
<li class="nav-item">
<a class="nav-link" th:href="@{?lang=fr}">
<img th:src="@{/images/french.png}" width="30">
</a>
</li>
I want to get this url admin/brands/page/1?sortField=name&sortDir=asc&lang=fr
How can I do that?