Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Eric7
Resolver I
Resolver I

Embedded report, localeSettings does not set USERCULTURE()

In a Power BI Embedded report, specifying the locale setting localeSettings: { language: 'nb-NO' } in the config setting in js does not seem to work, USERCULTURE() is still "en-US"

 

var config = {

...

localeSettings: { language: 'nb-NO' }

}

 

var report = powerbi.embed(embedContainer, config);

 

I have installed the latest version of the Power BI javascript api: 2.23.1

 

Adding &language=nb-NO in the url to the same report in Power BI service does indeed work.

 

I have also tried to add &language=no&formatLocale=nb-NO to the embed url, as well as &language=nb-NO, but USERCULTURE() is still "en-US".

 

Is there any way of having USERCULTURE() set to something different than the browser language in embedded mode? According to Ted Pattison, it should be possible to set localeSettings in the config definition in js.

1 ACCEPTED SOLUTION
Eric7
Resolver I
Resolver I

Alright, ChatGPT solved the mystery...

After this function is called: powerbi.bootstrap(reportContainer, { type: "report" });

Any localeSettings specified after that will be ignored.

Unless one also calls powerbi.reset(reportContainer); immediately after powerbi.bootstrap().

 

https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/bootstrap-better-performance#limit...

 

This was really a rather hidden limitation.

View solution in original post

3 REPLIES 3
Eric7
Resolver I
Resolver I

Alright, ChatGPT solved the mystery...

After this function is called: powerbi.bootstrap(reportContainer, { type: "report" });

Any localeSettings specified after that will be ignored.

Unless one also calls powerbi.reset(reportContainer); immediately after powerbi.bootstrap().

 

https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/bootstrap-better-performance#limit...

 

This was really a rather hidden limitation.

rajendraongole1
Super User
Super User

Hi @Eric7 - I have done this sometime back, can you try to do the changes in your embed URL?

 

Enure that you are using correct and supported locale codes (language: 'nb-NO', formatLocale: 'nb-NO').

If setting the locale settings in the config does not work, try appending &language=nb-NO&formatLocale=nb-NO directly to the embed URL as a troubleshooting step.

If still issue persists,consider contacting Microsoft Power BI support for assistance.

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi, not much help from support... they only said that it should work, without trying it in practice.

 

I have had no luck with adding &language=nb-NO&formatLocale=nb-NO to the embed url either.

I have tried ading parameter language=nb-NO both first and last in the embed url (also tried with the additional formatLocale paramter):

 

Eric7_1-1717608516797.png

 

The other settings in the config we use like the panes: { ... } element works, just not the localeSettings.

 

As I wrote in the start of this thread, opening the report in Power BI Service with the parameter "&language=nb-no" added to the url does indeed work as expected.

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.