Forum Discussion
Dynamic Language and Direction Change in Power BI Reports (English and Arabic)
- 1 year ago
Hi ,
In this scenario i suggest you to raise a support ticket here. so, that they can assit you in addressing the issue you are facing. please follow below link on how to raise a support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
thanks,
Prashanth Are
Hi ashi7upt ,
Dynamic language and direction changes in Power BI require a combination of measures, translations, and layout adjustments. Here’s how you can achieve this for English (LTR) and Arabic (RTL):
Steps to Implement:
1. Language Selection Mechanism
- Create a parameter table to allow users to select the language. Example:
Language Table: LanguageID | LanguageName 1 | English 2 | Arabic
- Create a slicer in your report using the LanguageName column.
2. Dynamic Translations
- Add a translation table containing labels or text in both languages. Example:
Translation Table: LabelKey | EnglishText | ArabicText Title | "Sales Report" | "Arabic Translation Here" Total | "Total Sales" | "Arabic Translation Here"
- Write a DAX measure to dynamically switch text based on the selected language:
DynamicText = VAR SelectedLanguage = SELECTEDVALUE('Language Table'[LanguageName]) RETURN SWITCH( SelectedLanguage, "English", MAX('Translation Table'[EnglishText]), "Arabic", MAX('Translation Table'[ArabicText]), MAX('Translation Table'[EnglishText]) -- Default to English )
3. RTL and LTR Layout Adjustments
Use Bookmarks to create two separate layouts:
- One layout for English (LTR alignment).
- One layout for Arabic (RTL alignment).
In the Arabic layout:
- Align visuals to the right.
- Flip the orientation of charts and slicers.
- Reverse horizontal elements, like bar charts or progress indicators.
Use a DAX measure to dynamically control which bookmark is shown:
SelectedLayout = SELECTEDVALUE('Language Table'[LanguageName])Use conditional navigation based on this measure.
4. Dynamic Titles and Labels
- Update the titles and labels of visuals using dynamic measures:
- For example:
TitleMeasure = SWITCH( SELECTEDVALUE('Language Table'[LanguageName]), "English", "Sales Overview", "Arabic", "Arabic Translation Here" )
- For example:
5. Testing and Deployment
- Test language switching and layout changes thoroughly.
- Ensure visuals like charts, tables, and slicers respond dynamically to both RTL and LTR formats.
Tips:
- Font Compatibility: Use a font that supports both English and Arabic characters.
- Auto-Refresh: To avoid manual refresh issues, ensure slicer selections dynamically update visuals and layouts.
- RTL/Theme Settings: Customize theme JSON files to set RTL for Arabic layouts.
Outcome:
When a user selects a language:
- The report text updates dynamically (e.g., "Sales Report" switches to its Arabic equivalent).
- The layout adjusts between LTR (English) and RTL (Arabic).
Let me know if you need further help or sample implementation!
Please mark this as solution if it helps. Appreciate Kudos.
Thank you for your response, it is helpful but it does not solve my full problem.
Is there a way to change the embedded report's direction based on the application's language selection from right to left on Arabic language selection from left to right when the English language is selected?
- v-prasare1 year agoCommunity Support
Hi ashi7upt,
Hope you are doing well, Sorry for delayed response here.
PFB similar/duplicate thread answered by user in community forum:
Request for RTL Support When Embedding Reports in ... - Microsoft Fabric Community
Thanks,
Prashanth Are
MS Fabric community support.
Did we answer your question? Mark post as a solution, this will help others find answers quickly!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"
- v-prasare1 year agoCommunity Support
ashi7upt , As we haven’t heard back from you, we wanted to kindly follow up to check if the above solution provided by our community member answers your query? let me know if you need any additional help.
Your feedback is important to us, Looking forward to your response.
Thanks,
Prashanth Are
MS Fabric community support.
Did we answer your question? Mark post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"