Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Localization in a Fusion app
We are testing an application in Fusion and I can't seem to find anything about localization in a Fusion app. I do see there is solution for a java Flow application, but would that solution also work in Fusion?
There is nothing specifically included in Vaadin Fusion for the localization. To translate the captions, you can use lit-translate npm package.
The documentation of the package is quite good: https://github.com/andreasbm/lit-translate
There is also this solution (I didn't try it and it's still in active development): https://www.npmjs.com/package/@lit/localize
I have written Java utility that transforms translation items in an Excel sheet to the lit-translate JSON format.
This allows you to manage and automatically translate your items in Google Sheets and then quickly transform to JSON. Not flawless, but definitely a time saver.
Happy to share if anyone is interested.
Thanks for your replies - we will take a closer look at lit-translate.
I've created an example here: https://github.com/jcgueriaud1/vaadin-multilanguage-app
The validation is not working , there is an open ticket: https://github.com/vaadin/flow/issues/10688
Thanks, that is awesome! I will check out the example.