In the past two recipes, we have changed a standard application so that it can be translated and we performed the translation itself. In this recipe, we will add something that will make switching between languages much easier for users.
To start this recipe, we will need an application that has been translated like the application we created in the past two recipes.
The best place to create a language switch is a place that is visible at all times. In this case, we will use the navigation bar. Since this bar is in the header of our application, it is visible on all pages; ideal for our purposes.
We have now created a link in the navigation bar that will direct users to the English part of the application. To create a link to the Dutch version of the application, repeat these steps but change the Entry Label to 'Nederlands' and set With these values to nl instead of en.
Remember to run the XLIFF translation steps again to make sure the new text is available in both languages.
When we now run the application, we can see that two entries are available in the navigation bar.
Clicking on Nederlands will show the application in Dutch and clicking on English will change it back to the English language.
52.15.129.90