In this tutorial we will learn how to implement an I18NProvider that is used for the translation functionality inside Flow. Focus will be the question, how to deal with different languages (I18N).
For more detailed information, read the tutorial at https://vaadin.com/tutorials/i18n/i18nprovider please.
All tutorials are available under https://vaadin.com/tutorials
If you want to run this demo on your local machine, you can try out the docker image that is provided. To run this type:
docker pull vaadintutorials/flow-i18n-i18nprovider
docker run -p8899:8899 --name demo vaadintutorials/flow-i18n-i18nprovider
After the images/container started you can try this demo with your local browser by calling the following URL http://localhost:8899
After you used this docker image you can clean up your system with the following commands.
docker rm demo
docker image rm vaadintutorials/flow-i18n-i18nprovider
If you want to build this docker image on your machine you can use the provided Dockerfile
docker build -t vaadintutorials/flow-i18n-i18nprovider .
On Heroku you find a deployed version. https://flow-i18n-i18nprovider.herokuapp.com/
If you want to build this demo check out the repository and invoke the command: mvn clean package -Dvaadin-install-nodejs
Together with this demo, you will find some jUnit5 Selenium UI Tests based on Testbench To get this running you need a license, or you can request a trial from https://vaadin.com/trial
To activate the Testbench tests during the maven build process set the environment variable TESTBENCH with the value on With your IDE you can run every test without setting this variable.
To support the Heroku pipeline we need a few preparations.
- the app must be able to get a configured port for the http port during the start up
- add the shade plugin to create a fat jar
- create the file Procfile and add the line
``web: java -jar target/vaadin-app.jar -port $PORT```
- web - to activate the web profile
- -jar - define what fat jar must be started
- -port make the dynamic associated port available for the app
- add a file settings.xml to configure the maven build process