Usage
localization_settings: { localization_level: permissive default_locale: en import_locale_defs: yes | no }
|
Hierarchy
localization_settings |
Default Value
None
|
Definition
By adding localization to your project, you can customize the display of the labels and descriptions in the Looker UI based on a user's locale, and you can also localize certain parts of LookML dashboards. See the Localizing your LookML model documentation page for information about setting up your model for localization.
Use the localization_settings parameter to enable localization for your project and to specify how your project handles localization:
- The
default_localeparameter specifies the default locale strings file that defines which strings in your model are localized. Enter the exact name of the file (case-sensitive) without the file extension. For example, if the strings file is nameden.strings.json, you would specifydefault_locale: en. See the Localizing your LookML model documentation page for information about how the locale strings files work. - The
localization_levelparameter specifies whether strings with no translation are allowed in your model:- Set the localization level to
strictif you want the Looker IDE to return a LookML validation error for any labels or descriptions that aren't defined in the default locale strings file. - Set the localization level to
permissiveto allow labels and descriptions that aren't defined in the default localization strings file.
- Set the localization level to
- The
import_locale_defsparameter specifies whether locale definitions from imported projects should be combined with the importing project's locale definitions:- Set to
yesto combine locale definitions from imported projects with the importing project's locale definitions. - Set to
no(the default value) to ignore locale definitions from imported projects. Looker will use the locale definitions from the importing project only, if the importing project has locale definitions.
- Set to
See the Localizing your LookML model documentation page for more information about the localization settings.
Example
In a manifest file, specify that the default locale is "en", that localization has a permissive policy, and that locale definitions from imported projects should be combined with the importing project's locale definitions:
project_name: "flights"
localization_settings: {
default_locale: en
localization_level: permissive
import_locale_defs: yes
}