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_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:
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:
label: to change the name of the explore in the model file - this changes the label right above the field search bar.
- explore: order_items
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.
- join: inventory_items
label: to change all field names in each view file. This changes the field labels in the field picker list.
- dimension: inventory_item_id
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.
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?