Ich möchte eine Option einer Select-Box basierend auf dem Gebietsschema auswählen, aber es gibt keine Möglichkeit. Ich habe versucht:Thymeleaf: th: in einer Dropdown-Liste ausgewählt
<option value="AR" th:selected="${#locale.country.contains('AR')}" >Argentina</option>
<option value="AR" th:selected="${#locale.contains('AR')}" >Argentina</option>
<option value="AR" th:selected="${__${#locale}__.contains('AR')}" >Argentina</option>
<option value="AR" th:selected="${#{__${#locale}__}.contains('AR')}" >Argentina</option>
Diese Option zeigt das Land (US)
<option value="US" th:text="${#locale.country}" th:selected="${#locale.country == 'US'}" >United States</option>
Aber diese Option aktiviert ist nicht.