Knowledge Drop

Is model localization also applied to UDD?


Userlevel 5

Last tested: Feb 12, 2021
 

When we apply localization on the model level, some elements would be localized on explores, looks and user defined dashboards, as for example labels, group labels and descriptions and even data values. Take a look on the docs for more elements that can be localized on the model level.

Some dashboards elements can't be localized on user defined dashboards as for instance, dashboard and tiles titles, text tiles, notes.

See the example below, where we are applying localization on the model level:

pt_BR.string.json

{

"gender": "Genero",

"f": "Feminino",

"m": "Masculino",

"users": "usuarios",

"count" : "Total",

"Male vs Female" : "Masculino vs Feminino" ,

"Count of Gender Dashboard" : "Dashboard Total de Genero"

}

 

users.view
Here I am using liquid to apply the localization on the data level.

 

view: users{

label: "users"

measure: count {

label: "count"

type: count

drill_fields: [id]

}

dimension: gender {

label: "gender"

type: string

sql: CASE

WHEN ${TABLE}.gender = "f" THEN "{{ _localization['f'] }}"

WHEN ${TABLE}.gender = "m" THEN "{{ _localization['m'] }}"

ELSE Null

END;;

}

}

 

We can see the localization being applied on the Explore:

image.png

On look and UDD we also have the axis, values, and fields being translated to pt_BR. However not the Look, Dashboard and tile titles. Even so, we have those key-values pairs on our pt_BR string files.

image.png

image.png

Note that, if the string file is not your default_locale one, you need to also have the key-value pairs defined on the string file you are using as the default locale on the localization settings. See some examples here.

 

This content is subject to limited support.                

 

 


0 replies

Be the first to reply!

Reply