Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
Solved! Go to Solution.
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().
This was really a rather hidden limitation.
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().
This was really a rather hidden limitation.
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!!
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):
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.
User | Count |
---|---|
84 | |
79 | |
71 | |
48 | |
43 |
User | Count |
---|---|
111 | |
54 | |
50 | |
41 | |
40 |