Changing Between Languages in Tableau
This tutorial will guide you through the process of implementing language switching functionality in Tableau. By following these steps, you'll be able to create a dashboard that allows users to switch between languages.
Step 1: Creating Parameters
To get started, create the following parameters:
- Spanish: A boolean parameter that indicates the current language state on the dashboard.
- dLanguageControl: A calculated field designed to toggle our language parameter between the two states.
- dButtonLanguage: Another calculated field responsible for displaying the current language to the user.
- True and False: These fields will play a role in the dashboard actions.
Step 2: Designing the Language Button
Proceed to create a new sheet that will function as the language switch button on the dashboard. Arrange the previously created fields as follows: place the language label in the Text field and the rest as details.
Step 3: Setting Up Dashboard Actions
In the Dashboard workspace, establish two actions to facilitate language switching:
- Change Language: Define this action to modify the Spanish parameter. Select the calculated field dLanguageControl as the target to effect the language change.
- Deselect Button: I learned this from this blog https://consult-ant.uk/2023/05/04/light-sabers/ This trick ensures smooth interaction with the button.
Step 4: Organizing Translations
Finally, create a "dictionary" folder within your variables. This folder will house all the necessary translations for different languages.
- Static Text: Some translations pertain to static text elements used for titles and subtitles.
- Fields: Other translations correspond to the fields provided by your client, which are integral for constructing the graphs and visualizations.
This is an example of how to use the calculated field in a chart. You can find this and more examples in: https://public.tableau.com/app/profile/munozdataviz/viz/VNRQualityTrackerInProgress/VNRQualityTracker
Feel free to reach out if you have any questions!