Localizing Looker means displaying text and data in Looker in different ways for different users. Looker admins can set Looker to display certain user interface text in different languages, as well as set different default number formats. Data within Looker can be localized by localizing the data models.
Localizing the Looker User Interface
Certain Looker user interface text can be displayed into the following languages:
|Language||Locale Code and Strings File Name|
To enable localization, set the locale for users or user groups through one of the following methods:
- To set a locale for individual users: Use one of the codes in the above table in the Locale (beta) field on the Edit User page in the Admin panel.
- To set a locale for a user group: Assign one of the codes in the above table to the
localeuser attribute for a particular user group. If users within a group have set a custom value using the Locale (beta) setting, the custom value will override any value assigned to the group. To prevent that from happening, ensure the User Access setting for the locale user attribute is not set to Edit.
For users with no locale set, Looker uses English as the default.
Localizing Data Models
While localizing the Looker user interface translates various menus and screen text within Looker, in order to see translations inside data tables and visualizations, your data models must be localized.
Models can be localized into any language for which
.strings files can be created; model localization is not constrained to the languages supported by user interface localization.
To localize both data models and the Looker user interface, the models’
.strings files must be named with the same locale code used for the user interface. Then, setting the Locale (beta) field or the
locale user attribute to the appropriate code will localize the models and the user interface.
Localizing Number Formatting
The default number format setting in Looker is 1,234.56. The number format for numbers that appear in data tables and visualizations can be set to any of the following:
- 1,234.56: Thousands separated with commas; decimals separated with a period.
- 1.234,56: Thousands separated with periods; decimals separated with a comma.
- 1 234,56: Thousands separated with a space; decimals separated with a comma.
Setting Number Formats for Users
You can set a number format through one of the following methods:
- To set a number format for individual users: Select the desired format from the
number_formatuser attribute drop-down menu on the Edit User page in the Admin panel and click Save.
- To set a number format for a user group: Assign the desired format to the
number_formatuser attribute for a particular user group. If users within the group have set a custom value for
number_format, the custom value will override any value assigned to the group. To prevent that from happening, ensure the User Access setting for the
number_formatuser attribute is not set to Edit.
The default number format in Looker looks like this:
If you change the
number_format user attribute to 1.234,56, it looks like this:
number_format User Attribute with Other Methods of Number Formatting
If you use the LookML parameters
value_format to format fields in your models, the number format selected in the
number_format user attribute is applied on top of the format given in the LookML parameters. For example:
Similarly, if you use the Value Format field in a visualization’s Edit menu, the number format set in the
number_format user attribute will be applied on top of the format selected in the Value Format field:
You cannot use LookML parameters or the Value Format field in a visualization’s Edit menu to set formatting to 1.234,56 or 1 234,56. To set those formats, you must use the
value_format_name, and the Value Format field use Excel-style formatting strings.
number_format User Attribute with
New in Looker 6.16, you can use
strict_value_format to override the
number_format user attribute.
Typically, the number formatting set in the
number_format user attribute is applied on top of formats applied by LookML parameters.
However, if you wish to create a number format that is not affected by the
number_format user attribute, you can use the
named_value_format model parameter to create a number format and set its
strict_number_format subparameter to
yes. That format can then be applied to fields using the
value_format_name parameter, and those fields will not be affected by
For example, first create a custom format in your model file and set the
strict_value_format subparameter to
Then apply that formatting to a field or fields in your view file:
This results in a Look like this: