Question

Localizing View and Field Names in Looker

  • 28 January 2016
  • 2 replies
  • 1050 views

Userlevel 1

In LookML, you can use aliasing parameters to make data exploration in Looker a much more user-friendly experience. For example, you might alias a column titled user_reg_date as user_registration_date to make it easier for others to understand what this piece of data describes. You might even take this a step further and try to localize view and field labels to match non-English translations, or even non-Western characters.



Aliasing on the front-end:



view_label: and label: are the two aliasing parameters we’ll use in this article. These parameters change the names of views and each fields at the front end / UI level, keeping the actual underlying names intact for LookML reference purposes. These also allow you to use non-Western characters commonly used in East Asian languages, since we’re not tampering with how Looker writes SQL, which is restricted by what languages / formatting the database itself can handle. Read more about labeling, field naming, and explore naming here.



eCommerce in Japanese:



Let’s say you have an office in Japan. You can either keep using English as the main language to describe data in Looker, or you could translate labels into Japanese, which is what I did in the example below:




You can see that almost everything from the explore name to each field have been translated into Japanese, even in the visualization, albeit with some caveats.



Do it Yourself:



The example above can be achieved in the following three steps:



1.Use label: to change the name of the explore in the model file - this changes the label right above the field search bar.



LookML:



- explore: order_items

label: "オーダーアイテム"



Result:





2.Use view_label: to change the labels of each view file grouped into this explore in the model file. This changes the labels in the gray bars in the field picker.



LookML:



- join: inventory_items

view_label: "在荷"



Result:





3.Use label: to change all field names in each view file. This changes the field labels in the field picker list.



LookML:



- dimension: inventory_item_id

label: 在荷アイテムID



Result:





P.S. Custom axis labels, as well as Look and Dashboard names support non-Latin UTF-8 characters too!




2 replies

Hi there - I appreciate the post regarding localizing the view for field names. Question, I know that looker supports a few languages so does this mean if we localize our model to en_fr that the main tabs (like “visualization”, “data”, “table”, “SQL”, “Calculations” even “Search” will be translated?

Userlevel 7
Badge +1

Per the 6.10 release notes,






It looks like dashboards and visualizations in particular get those strings localized, but I don’t think those main tabs/core product text areas are translated yet— Those will be coming in later versions of the localization effort.

Reply