Use locale values in multiple-language Power BI reports - Power BI (2024)

  • Article

Every report that loads in the Power BI service initializes with a user context that identifies a language and a geographical region known as a locale. In most cases, a locale identifies a country/region. The Power BI service tracks the combination of the user's language and locale using a culture name.

A culture name is usually a lower-case language identifier and an upper-case locale identifier separated by a hyphen. The culture name en-US identifies a user in the United States who speaks English. A culture name of es-ES identifies a user in Spain who speaks Spanish. A culture name of fr-FR identifies a user in France who speaks French. A culture name of de-DE identifies a user in Germany who speaks German.

USERCULTURELanguageLocale
en-USEnglishUnited States
es-ESSpanishSpain
fr-FRFrenchFrance
de-DEGermanGermany

Note

In some cases, a culture name also includes other information. For example, there are two different culture names for the language Serbian in Serbia, which are sr-Cyrl-RS and sr-Latn-RS. The part in the middle known as the script (Cyrl and Latn) indicates whether to use the Cyrillic alphabet or the Latin alphabet. For more information, see RFC 4646.

For a list of culture name values, see ISO 639 Language codes and Online Browsing Platform.

At the start of a project that involves creating a new Power BI semantic model (previously known as a dataset) with metadata translation, list the culture names that you plan to support. Next, extend the semantic model by adding metadata translations for each culture name.

The following diagram shows a semantic model that has a default language setting of en-US. The semantic model has been extended with metadata translations for three other culture names: es-ES, fr-FR, and de-DE.

Every metadata translation is associated with a specific culture name. Cultures names act as lookup keys that are used to add and retrieve metadata translations within the context of a Power BI semantic model.

You don't need to supply metadata translations for the default language of the semantic model. Power BI can just use the semantic model object names directly for that culture name. One way to think about this is that the semantic model object names act as a virtual set of metadata translations for the default language.

It's possible to explicitly add metadata translation for the default language. Use this approach sparingly. Power BI Desktop doesn't support loading metadata translations in its report designer. Instead, Power BI Desktop only loads semantic model object names. If you explicitly add metadata translations for the default language, Power BI reports look different in Power BI Desktop than they do in the Power BI service.

Load a report in Power BI

When a user navigates to a Power BI report with an HTTP GET request, the browser transmits an HTTP header named Accept-Language with a value set to a valid culture name. The following screenshot shows a GET request that transmits an Accept-Language header value of en-US.

When the Power BI service loads a report, it reads the culture name passed in the Accept-Language header and uses it to initialize the language and locale of the report loading context. On their devices, users can control which culture name is passed in the Accept-Language header value by configuring regional settings.

When you open a Power BI report in the Power BI service, you can override the Accept-Language header value by adding the language parameter at the end of the report URL and setting its value to a valid culture name. For example, you can test loading a report for a user in Canada who speaks French by setting the language parameter value to fr-CA.

Note

Adding the language parameter to report URLs provides a convenient way to test metadata translations in the Power BI service. This technique doesn't require you to reconfigure any settings on your local machine or in your browser.

Support multiple locales for a single language

You might need to support multiple locales for a single spoken language. Consider a scenario with users who speak French but live in different countries, such as France, Belgium, and Canada. You publish a semantic model with a default language of en-US and metadata translations for three more culture names including es-ES, fr-FR, and de-DE.

What happens when a French-speaking Canadian user opens report with an Accept-Language header value of fr-CA? Does the Power BI service load translations for French (fr-FR) or does it fall back on the English semantic model object names?

Measures currently act differently than tables and columns in Power BI. With measures, the Power BI service attempts to find the closest match. For the culture name of fr-CA, the names of measures would load using the metadata translations for fr-FR.

With tables and columns, the Power BI service requires an exact match between the culture name in the request and the supported metadata translations. If there isn't an exact match, the Power BI service falls back to loading semantic model object names. The names of tables and columns in this scenario would load using English semantic model object names.

Note

This use of the default language for the names of tables and columns is a known issue for Power BI.

We recommend that you add metadata translation for any culture name you want to support. In this example, add three sets of French translations to support the culture names of fr-FR, fr-BE and fr-CA. The approach handles the scenario where the French translations for users in France are different from French translations for users in Canada.

Implement translations using measures and USERCULTURE

Another feature in Power BI that helps with building multiple-language reports is the Data Analysis Expressions (DAX) USERCULTURE function. When called inside a measure, the USERCULTURE function returns the culture name of the current report loading context. This approach makes it possible to write DAX logic in measures that implement translations dynamically.

You can implement translations dynamically by calling USERCULTURE in a measure, but you can't achieve the same result with calculated tables or calculated columns. The DAX expressions for calculated tables and calculated columns get evaluated at semantic model load time. If you call the USERCULTURE function in the DAX expression for a calculated table or calculated column, it returns the culture name of the semantic model's default language. Calling USERCULTURE in a measure returns the culture name for the current user.

The example report displays the USERCULTURE return value in the upper right corner of the report banner. You don't typically display a report element like this in a real application.

This code is a simple example of writing a DAX expression for a measure that implements dynamic translations. You can use a SWITCH statement that calls USERCULTURE to form a basic pattern for implementing dynamic translations.

Product Sales Report Label = SWITCH( USERCULTURE() ), "es-ES", "Informe De Ventas De Productos", "fr-FR", "Rapport Sur Les Ventes De Produits", "fr-BE", "Rapport Sur Les Ventes De Produits", "fr-CA", "Rapport Sur Les Ventes De Produits", "de-DE", "Produktverkaufsbericht", "Product Sales Report")

For more information, see Learn DAX basics in Power BI Desktop.

Format dates and numbers with current user locale

You can translate dynamically by writing a DAX expression in a measure with conditional logic based on the user's culture name. In most cases, you aren't required to write conditional DAX logic based on the user's locale because Power BI visuals automatically handle locale-specific formatting behind the scenes.

In a simple scenario, you build a report for an audience of report consumers that live in both New York (en-US) and in London (en-GB). All users speak English (en), but some live in different regions (US and GB) where dates and numbers are formatted differently. For example, a user from New York wants to see dates in a mm/dd/yyyy format while a user from London wants to see dates in a dd/mm/yyyy format.

Everything thing works as expected if you configure columns and measures using format strings that support regional formatting. If you're formatting a date, we recommend that you use a format string such as Short Date or Long Date because they support regional formatting.

Use locale values in multiple-language Power BI reports - Power BI (8)

Here are a few examples of how a date value formatted with Short Date appears when loaded under different locales.

LocaleFormat
en-US12/31/2022
en-GB31/12/2022
pt-PT31-12-2022
de-DE31.12.2022
ja-JP2022/12/31

Related content

  • Create multiple-language reports with Translations Builder
Use locale values in multiple-language Power BI reports - Power BI (2024)

References

Top Articles
How the original Planet of the Apes reflected the counterculture of the 1960s
Planet of the Apes - TV Tropes
Watch After Ever Happy 123Movies
Craigslist Kentucky Cars And Trucks - By Owner
Latina Webcam Lesbian
Https Paperlesspay Talx Com Boydgaming
Lifestyle | Stewartstown-Fawn Grove Daily Voice
New Zero Turn Mowers For Sale Near Me
Ff14 Kobold Pitman
Press And Sun-Bulletin Obits Today
Calling All Competitors Wow
Wdel News Today
Cooktopcove Com
The Nun 2 Showtimes Tinseltown
Sour Animal Strain Leafly
Shore Lodge Webcam
Transform Your Backyard: Top Trends in Outdoor Kitchens for the Ultimate Entertaining - Paradise Grills
The Real Housewives Of Atlanta 123Movies
Fandango Movies And Shows
What Time Does The Moon Rise At My Location
CHERIE FM en direct et gratuit | Radio en ligne
Let Basildon Sniff Your Hand
Sejinming Telegram
Mary Lou Willey Connors Obituary
Heyimbee Forum
Cluster Truck Unblocked Wtf
Samantha Lyne Wikipedia
Gw2 Blue Prophet Shard
Lvaction Login
Megan Hall Bikini
Devil May Cry 3: Dante's Awakening walkthrough/M16
20 Fantastic Things To Do In Nacogdoches, The Oldest Town In Texas
Dawson Myers Fairview Nc
M3Gan Showtimes Near Cinemark North Hills And Xd
Daftpo
Fineassarri
Sam's Club Hiring Near Me
Metrocast Channel Lineup
Research Tome Neltharus
Breitling ENDURANCE PRO X82310E51B1S1 für 2.885 € kaufen von einem Trusted Seller auf Chrono24
Craigs List Williamsport
Ms Trigger Happy Twitter
5613192063
What Time Does The Chase Bank Close On Saturday
Subway Surfers Unblocked Games World
Yahoo Sports Pga Leaderboard
Craigslist Farm And Garden Lexington
Transportationco.logisticare
Sir Anthony Quayle, 76; Actor Won Distinction in Theater, Film, TV
Craigslist Pgh Furniture
Signature Learn 365 | airSlate SignNow
Pollen Count Butler Pa
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6400

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.