GUI Designer dynamic change ResourceBundle

已回答

please give any example to realize change ResourceBundle local by GUI Designer!

Thanks very much!

https://www.jetbrains.com/help/idea/localizing-forms.html#designTimeLocale 

 

Changing Design-Time Locale

how to realize it JComboBox(Locale) changed ,my plugin UI text changed too(Custom load ResourceBundle when plugin start up)

1

Not sure I understand what you want to achieve. If you want to I18N-ize your plugin, see https://plugins.jetbrains.com/docs/intellij/localization-guide.html

0

Please see https://plugins.jetbrains.com/docs/intellij/localization-guide.html#components-location 

In my swing view, i want to define a JComboBox that can change locale, if it changed, the text in swing change to 

another locale text dynamicly

0

You'll need to use resource bundles instead of hardcoding texts and probably need to force refresh/repaint all UI controls on Locale-combobox-change to update texts.

1

yes! I just can not find a way or an api to change bundles locale,

i try use com.intellij.DynamicBundle but has no effect to change locale

could you please give some code or examples ?

how to change current Bundle locale to another? any api?

 

0

com.intellij.DynamicBundle is just for allowing additional localization plugins to contribute localized resources (e.g. https://plugins.jetbrains.com/plugin/13710-chinese-simplified-language-pack----)

 

if you want to provide localized resources in your plugin, follow above guide to bundle additional resource bundle variants in your plugin distribution

0

请先登录再写评论。