Model Level Localization
There are many components to localization in Omni, but a core component is localizing the field labels, descriptions, and other parameters that exist in your database to be more UI friendly for those who aren’t as familiar with the language your database is stored in. These same tactics can be used to generalize this out to any model concept, such as topic or view parameters as well.
This guide will show how we can use extension models to localize in this way, allowing your users a better building and consuming experience in Omni.
You can learn more about extension models here in an article from Russ on a similar use case.
Video Overview
Step by Step flow
- We’ll need to create a user attribute in your Omni environment, which you can do by going to Settings > Attributes > New Attribute. This piece of metadata for each user that logs in to Omni allows for the system to knows which language we should translate to. In the recording, this was the
language
attribute.
- We’ll need to add the below snippet of code to your shared model’s model file, and update the mappings with the languages you want to include
Example code in Model file
dynamic_shared_extensions:
- user_attribute: language
mappings:
Spanish: # Needs to match the name of the Shared extension created in step 3
values_for_model: [ es ] # Needs to match the value passed to Omni as a user attribute during the embed URL generation
French: # Needs to match the name of the Shared extension created in step 3
values_for_model: [fr, french] # Needs to match the value passed to Omni as a user attribute during the embed URL generation
Note: The values_for_model
will be the user attribute values that the system will search for when a user logs in, so these will need to match exactly
- From the shared model under the
model
menu bar, we’ll want to selectNew shared extension...
- You’ll need one of these for each language. This is where I created Spanish and French in my recording. FYI that it is case sensitive
- The value you put in here will need to match whatever you put for the languages under
mappings
- These extensions can later be accessed under the
Develop
menu accessible from the homepage under theExtensions
drop down.
- In each shared model extension, you will now be able to adjust the values of the
label
parameter to adjust to the given language’s translation on each field you want to have localized. You can also add translateddescription
parameters as well for a more complete experience.
If you have users who are building in the workbook, you can also localize for any dimension or measure parameters such as group_label
. The same applies to other model parameters beyond views as well.