Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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.

3 Replies

  • Hi Anonymous - 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!!

    • Anonymous's avatar
      Anonymous
      Not applicable

      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.