Hi,
What are various way to give different names for one dimension.
Dimension X have a label "nameA" I want nameB or nameC.
Dimension: X {
label: "nameA"
type: string
sql: ${TABLE}.;;
}
Thanks
Solved! Go to Solution.
If you could add what are you trying to achieve, I could give you better recommendations.
Generally speaking below three parameters affects the display name.
label: This is what you see in the explores, Looks & Dashboards . You can use Liquids to dynamically display the name.
label_from_parameter: Here you can provide the parameter name, Dimension/Measure name will be based on user input.
Below two parameters will affect only the explore field picker pane:
group_label: Collapsable name under which Dimension/Measure is available
group_item_label: Name of the Dimension/Measure under the group label.
Regards,
Prabha Arivalagan
Okay @hakim_ez , in that case. You provide the name in different language in the description parameter.
Below example Show the Gross Sales in German
measure: gross_sales_sum {
label: "Gross Sales $"
description: "Gross Sales $ (Bruttoumsatz) "
type: sum
.....
}
@hakim_ezSorry , Can you explain little bit more.
What the end user will do and what should be the behavior in Looker ?
Regards,
Prabha Arivalagan
@hakim_ez I think you are looking for localization. Please follow the below link to know more about it. Essentially you provide the locale string files.
locale strings files use key-value pairs to define how the labels and descriptions in your model are displayed for each locale. On the left side of each key-value pair is the localization key, which is a label or description string from your model. The right side of the key-value pair is where you define how you want that string to be displayed in the Looker UI.
If you want to automate this localization process, I have published the code as Open SOurce code. Let me know if you have any feedback.
https://medium.com/@prabhakaran_arivalagan/looker-localization-using-google-translate-api-acf1728bd8...
If you could add what are you trying to achieve, I could give you better recommendations.
Generally speaking below three parameters affects the display name.
label: This is what you see in the explores, Looks & Dashboards . You can use Liquids to dynamically display the name.
label_from_parameter: Here you can provide the parameter name, Dimension/Measure name will be based on user input.
Below two parameters will affect only the explore field picker pane:
group_label: Collapsable name under which Dimension/Measure is available
group_item_label: Name of the Dimension/Measure under the group label.
Regards,
Prabha Arivalagan
Thanks a lot @prabhakaran_mai
My users don't use the same name for the same dimension (Different language or synonym) , I want when they are researching a dimension in the research bar on the top of the panel they can find the dimension with a different name.
Best Regards,
Hakim
Okay @hakim_ez , in that case. You provide the name in different language in the description parameter.
Below example Show the Gross Sales in German
measure: gross_sales_sum {
label: "Gross Sales $"
description: "Gross Sales $ (Bruttoumsatz) "
type: sum
.....
}
Thanks, @prabhakaran_mai , it works in some way, but not the best way for my users who will need to change search options > select filters > field description and it will also mess up my description with tags.
@hakim_ezSorry , Can you explain little bit more.
What the end user will do and what should be the behavior in Looker ?
Regards,
Prabha Arivalagan
No problem is my fault. @prabhakaran_mai
The user will do what you show above with Gross sales in German, but by keeping the filter on label.
For me, the best way it will be /
@hakim_ez I think you are looking for localization. Please follow the below link to know more about it. Essentially you provide the locale string files.
locale strings files use key-value pairs to define how the labels and descriptions in your model are displayed for each locale. On the left side of each key-value pair is the localization key, which is a label or description string from your model. The right side of the key-value pair is where you define how you want that string to be displayed in the Looker UI.
If you want to automate this localization process, I have published the code as Open SOurce code. Let me know if you have any feedback.
https://medium.com/@prabhakaran_arivalagan/looker-localization-using-google-translate-api-acf1728bd8...