Show Microsoft Translations When Hovering Over Field Names in VS Code
This post is especially interesting for the people whose native language is not English. Do you know the feeling? You are looking at the source code of some .al object and you come across a field name that means absolutely nothing to you. It would be helpful for you if you could see the translation of this field name into your native language. Often this is already sufficient. In the old C/SIDE client we had the field “Caption” in the table designer to see the translation.
To bring the functionality back to you a bit, I added 2 new commands to my Visual Studio Code Extension AL Navigator 2 years ago:
- AL Navigator: Show Microsoft Translation (English -> Target Language)
- AL Navigator: Show Microsoft Translation (Target Language-> English)
With the version 0.5.1 of the AL Navigator, I take this a step further and enable users to see the translations when hovering over table fields like shown below.
It is not only possible to translate field names with these commands. In principle, you can translate any term that is contained in the Microsoft Dynamics Base app and for which a translation exists in the translation files.
Of course, the target language can be changed by the user. To do this, open your settings in Visual Studio Code (Ctrl + ,).
By default, the translation on hover is disabled. You can enable it in the settings by checking off “Enable Hover Providers”.
Select the “Translation Target Language” and you’re good to go. The setting “Max. No. Of Shown Translations” specifies how many translations should be shown when there is more than 1 possible translation.
I hope this helps you. Have fun with it.
4 thoughts on “Show Microsoft Translations When Hovering Over Field Names in VS Code”
This would be really helpfull addition to Business Central user interface too.
Is it possible, might there already be a solution?
I am from Finland and our company use BC in finnish. This is a pain it the ass, because translations are somewhat not logical. I have to change the whole BC into english to get match with english tutorials/guides to find correct place for changes.
If I as admin could have this feature it would make my life way easier.
I am not fully in charge with BC, we have a MS supplier who is the gatekeeper for some things as you propably know 😀
I am not aware of any solution for what you described. Maybe someone will provide us with a solution in the future, but it is unlikely.
Hello Waldemar,
How does the translation functionality work ? Are you using an online translation service or are you looking into the base .xlf files ?
I’m testing this with “Description” of the Campaign table.
In NLB this is “Omschrijving”.
AL Navigator translates this to “Beschrijving”.
Sure, the meaning is the same, but it is not exactly what is being used in BC.
Hey Simon,
sorry for the late response, I did not see your comment.
The translation that is most frequently used in BC is displayed. There is no check if the translation matches the object (for performance reasons). So if more tables translate Description with “Beschrijving” than with “Omschrijving”, then “Beschrijving” is shown in the translation.
This is not always 100% accurate, but most of the time it is correct. You can otherwise set the “Max No Of Shown Translations” setting to 2 or 3, then the other translations would also be shown.
Hope this helps.