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

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

1 Like

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

1 Like

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_ez Sorry , Can you explain little bit more.

What the end user will do and what should be the behavior in Looker ?
Regards,
Prabha Arivalagan

1 Like

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.

https://cloud.google.com/looker/docs/model-localization#using_localized_elements_in_your_model_files

1 Like

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

1 Like