Print at Dec 16, 2025, 2:32:50 PM

Posted by Puybaret at Mar 4, 2024, 5:53:03 PM
Re: Dynamic translation of a plug-in
Translation of plug-in menu items is not handled in HomePane class, they won’t change in the user interface.

Would this ever be possible?
Wondering if it wasn't too complicated to program, I looked at HomePane class and discovered that the translation of plug-in menu items has been supported since day 1! I completely forgot that I programmed that.
Your code might not work because you don't use the expected class loader in ResourceBundle.getBundle call. But I'm not sure and hope you'll find by comparing your code to the one in the new version 1.1 of ExportTOSH3F plug-in where I programmed this feature.

It would be nice if the program could check if the menu name matches one of the predefined menu names in English language, and, if so, put the new entry in the proper main menu regardless of the current language.
I programmed this feature and it will be available in the next version.
The handling of the Tools menu will wait.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator