Re: Existing menus localization

by hal9000 » Fri May 31, 2013 11:21 am

[:">] [:">] [:">] [:">] [:">] [:">] [:">]

OK, forget what I said... I centered on the PluginAction constructors and overlooked the ResourceBundle part.

If somebody is interested, you can retrieve the name of a menu, lets say the "3D view" menu, like this:

Code: Select all

ResourceBundle.getBundle("com.eteks.sweethome3d.swing.package").getString("HomePane.VIEW_3D_MENU.Name")
This is still not at runtime, but at least with this approach you don't need to copy to your plugin all the translations of the existing menus you want to use.

Thanks Emmanuel.