ecattez / word-of-poc

A poc to demonstrate the power of hotwire coupled with spring hateoas. Future is now, young boys.
Apache License 2.0
1 stars 0 forks source link

feat: Integrate translations #3

Open gabbloquet opened 3 years ago

gabbloquet commented 3 years ago

We want to be able to carry multi language. Documentation : https://phrase.com/blog/posts/how-to-localize-spring-applications-like-a-pro/

gabbloquet commented 3 years ago

This is interesting too : https://www.baeldung.com/spring-boot-internationalization

gabbloquet commented 3 years ago

@ecattez i think we have to use JQuery if we want to change lang on selection (with select). For now i will use a button to be html compliant. https://stackoverflow.com/questions/49580565/onchange-method-not-working-with-thymeleaf-select-option/51573466

ecattez commented 3 years ago

To begin, we will use the language set in the web browser's preferences. HTTP Requests are sent with an Accept-Language header containing the language we should use for the responses.