SSO Embed localisation

I've seen this post (https://www.googlecloudcommunity.com/gc/Technical-Tips-Tricks/SSO-Embed-locale-localisation/ta-p/588...) on how to set the locale for an embed SSO dashboard, but this only seems to apply to the localization of the model

"""
If your LookML model is localized, you can use the locale user attribute in the embed URL to specify a language for the embed. For example, including the parameter user_attributes { "locale" : "fr_FR" } would cause the embed to load French as its language.
"""

source: https://cloud.google.com/looker/docs/single-sign-on-embedding
When I look at an Embed user, it doesn't seems they have any Localization settings

User 

Edit_User.png

Embed user 

Edit_User.png

Solved Solved
1 2 122
1 ACCEPTED SOLUTION

Roderick
Community Manager
Community Manager

You are correct, Embed users do not have any localization settings. The locale user attribute is used to specify the language for the embed, but this attribute is only available for users who are authenticated through Looker. If you are embedding your dashboard in a third-party application, the user will not be authenticated through Looker, and the locale user attribute will not be available.

There are a few ways to work around this limitation:

1. One way is to use the LookML locale feature to localize your dashboard. This will allow you to create different versions of your dashboard for different languages. For example, you could create a French version of your dashboard and a English version of your dashboard.

2. Another way to work around this limitation is to use the JavaScript API to set the locale for the embed. The JavaScript API allows you to interact with the embed iframe, and you can use this API to set the locale for the embed.

Here is an example of how you can use the JavaScript API to set the locale for the embed:

Code snippet
var embed = document.getElementById('embed');
embed.locale = 'fr_FR';

This will set the locale for the embed to French.

I hope this helps!

 

View solution in original post

2 REPLIES 2

Roderick
Community Manager
Community Manager

You are correct, Embed users do not have any localization settings. The locale user attribute is used to specify the language for the embed, but this attribute is only available for users who are authenticated through Looker. If you are embedding your dashboard in a third-party application, the user will not be authenticated through Looker, and the locale user attribute will not be available.

There are a few ways to work around this limitation:

1. One way is to use the LookML locale feature to localize your dashboard. This will allow you to create different versions of your dashboard for different languages. For example, you could create a French version of your dashboard and a English version of your dashboard.

2. Another way to work around this limitation is to use the JavaScript API to set the locale for the embed. The JavaScript API allows you to interact with the embed iframe, and you can use this API to set the locale for the embed.

Here is an example of how you can use the JavaScript API to set the locale for the embed:

Code snippet
var embed = document.getElementById('embed');
embed.locale = 'fr_FR';

This will set the locale for the embed to French.

I hope this helps!

 

Thank you for your quick response. The proposed workaround is a great solution. Thanks

Top Labels in this Space
Top Solution Authors