11.1.5 Create a template
Assuming you have set up the pages router, you can create a template file at:
src/main/kauri/pages/i18ntest.html.xml
with something like this in it:
<html>
<body>
The word yes in your language is: ${i18n('yes')}.
</body>
</html>
If you request this page in your browser, you will most likely see the word "yes", except if your browser would be configured to prefer french, in which case you will see "oui". The language en is by default used as fallback in case no bundle for the user's language is available.
The kauri-i18n-sample includes a settings page to change your locale. You can easily reuse this settings page as it is not part of the i18n sample itself, but is a resuable snippet provided by the kauri-i18n-impl module.
For more details about how the user's locale is determined, and how to change
this, see
Previous