Automatic translation of tabular model

Automatic translation of tabular model

Automatic translation of tabular model using Tabular Editor and Excel is possible since the Power BI team gave read/write access to the XMLA endpoint. For the moment, it is a preview feature so be careful using it and work only on copies of your reports.

Automatic translation demonstration

Please watch this 5 mn video for an overview of the translation solution :

Tabular Editor scripts

These are scripts I wrote to save objects from Tabular Editor to a tsv file and to load translations from a tsv file to Tabular Editor. A tsv file is a text file containing data separated by a tab character :

Once the scripts are downloaded, you can load them in Tabular editor this way :

  • Save the downloaded scripts in a folder
  • Open “Advanced Scripting” tab, then click on the “Open a C# script from a file” and select a downloaded script
automatic translation
  • Modify the path in variables below “// Modify files locations”
  • Click on “+” button
  • Give a name to the custom action and check at least the “Model” checkbox then click “Ok” button
  • Click on the “Play” button when you want to execute the script or right click on the “Model” in the tree and select ” Custom actions/your custom action name”
  • Redo all these steps each time you get a new version of the scripts !

When you execute the “Save translatable objects” script, translatable objects are exported to a tsv file which is used by the Excel file.

You can get the Excel file in this blog post : https://thebipower.fr/index.php/2020/05/10/automatic-translation-of-visuals-labels/

References

Tabular Editor is a powerful tool for tabular model edition created by Daniel Otykier : https://tabulareditor.com/
Detailed presentation : https://powerbi.tips/2020/04/tabular-editor-rocks/

Supported languages and countries/regions for Power BI : https://docs.microsoft.com/en-us/power-bi/supported-languages-countries-regions

Limitations

Model name and hierarchies levels are not translated for the moment but might be in the future

Warning

See also :
Visuals labels translations in Power BI reports : https://thebipower.fr/index.php/2020/05/07/visuals-labels-translations-in-power-bi-reports/
Automatic translation of visuals labels : https://thebipower.fr/index.php/2020/05/10/automatic-translation-of-visuals-labels/

18 Comments

  1. Hi Didier

    Very good post
    So, I think we can very soon deploy a dataset (version new metadata) to Azure Analysis Service ?
    I do not have access to custom action -> save translatable object -> opening of excel, when I am on the model
    Need help please ;>)

    Best regards

  2. Hello,
    That’s a great post.
    Thank you for sharing.
    I have requirement where the report must be translated to different languages including column headers, tool tips,titles etc..
    I think you method can help me for column headers.
    Can you please share the excel sheet you used for the translation purpose

    1. Thank you,
      This method can help translating the whole report (visuals, model, data).
      Please visit this post as a starting point to understand the whole project : https://thebipower.fr/index.php/2020/07/05/translations-life-cycle-management/

      You need to consider Automatic translation of tabular model is in preview because XMLA endpoint read/write is a preview feature in Power BI. Please be carefull at the moment.
      Files and the Excel plugin are in this post : https://thebipower.fr/index.php/2020/05/10/automatic-translation-of-visuals-labels/
      The post above will be updated during next weeks with an how to. You can share your experience and let me know about potential improvements.

  3. All works great in Desktop. Is there any reason it doesn’t work in the Workspace after publishing? – I changed every locale setting, Windows, Workspace, Browser and it still wouldn’t change when running the report from a Workspace and this was on a pbix that would change in the Desktop successfully, but the Workspace copy only changes the Power BI standard titles not the field titles.

    1. Hello,
      Did you activate the preview feature “enhanced metadata format” in your report ? If it still doesn’t work, I suppose it is because the XMLA endpoint is still a preview feature. We need to be patient.
      You can check your translations in tabular editor. If they are correct then there is nothing else to do.
      To change the language in the service, you only need to select the language in “Parameters / Language” in Power BI service.

  4. When I try to “Translate All Lines”, I get a error stating that I need to check my internet connection…however the internet is connected and I can download and browse.

    Can you please help with a solution?

    1. Hello,
      Do you have Internet explorer installed ? If yes, which version ? Can you try Google translate within Internet explorer ? May be you have a proxy or VPN ? Is your connection slow ?
      Please try from another machine / another network and let me know.

      1. Hello Didier

        I appreciate your response.

        I do have Internet Explorer installed, version 11.572.19041.0. I have no VPN and my internet connection is good.

        I have tried another network an it is still the same. I only have the one pc unfortunately.

        The error persists. All I can think of is that there is a neccessary premission that I need to change. Apologies if I am annoying XD

        1. Hello,
          You are not ennoying at all. That’s good to know some users experience problems.
          I released version 1.0.4 of the plugin. I hope it will solve your issue. Please let me know

          1. Hi Didier

            I installed the new plugin version but no result. I appreciate the support. I did a manual translation through Google translate.

            Overall the plugin is awesome!
            Thanks

  5. Hola!
    No tengo acceso a la acción personalizada -> guardar objeto traducible -> apertura de Excel, cuando estoy en el modelo
    ¿es necesario Power BI Premium?

    muchas gracias

    1. Hello,
      Premium is not necessary.
      I understand you cannot save the objects with a script in Tabular Editor. Am I right ? Did you follow the steps above in chapter “Tabular Editor scripts” ?
      In order to investigate further, please send me screenshots and explain how to reproduce the error
      Regards

  6. Outstanding, you saved me a lot of time (in the middle of very short deadlines).

    I love how Microsoft is bridging the gap between SSAS and PBI, but they are doing a poor job documenting it. If not because of your effort, I wouldn’t have known.

  7. Hello,
    Thank’s a lot for this excellent tip.
    Does-it work after publishing in power BI report server?
    I think that, until today, SSAS (tabular) translations are only supported in power BI premium, and work on power BI Desktop.

  8. Hello,
    Thank you. I don’t know about Power BI report server. It does work on the service and it worked on the desktop. Recently there was a regression on the desktop preventing translations to work but I guess it will be corrected in future versions.

Leave a Reply

Your email address will not be published. Required fields are marked *