How to give different name for one dimension

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 Solved
0 8 1,151
5 ACCEPTED SOLUTIONS

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

 

View solution in original post

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
    .....
}



prabhakaran_mai_1-1689092801356.png

 

 

View solution in original post

@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

View solution in original post

@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.

 

View solution in original post

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...

View solution in original post

8 REPLIES 8

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

hakim_ez_0-1689090939561.png

 

 

 

 

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
    .....
}



prabhakaran_mai_1-1689092801356.png

 

 

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 /

  1. Having a centralized parameter view, who can translate or give a synonym to the dimension or measure.
  2. Or a new parameter like tags, for any dimension or measure, who took translation and synonym.

@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...

Top Labels in this Space
Top Solution Authors