How to Dynamically Change Ribbon Button Text Based on Language Resources #38
-
|
Hi everyone, I'm working on implementing dynamic language switching in my application, and I'm having some trouble getting the UI (especially Ribbon buttons) to update their text at runtime based on the selected language. The example I’m referring to — "19-Localization" — only demonstrates how to set the thread culture at startup, which works fine for static initialization. However, I want to allow users to switch languages during runtime, and have the entire UI, especially the Ribbon controls, reflect the change immediately. Currently, I'm changing the culture like this: But the Ribbon button texts do not update unless I restart the application. I'm using resource files (Resources.resx, Resources.de-DE.resx, etc.) for localization, and I can access the correct strings manually via Resources.ButtonText. But it seems that simply calling Refresh() is not enough to make the Ribbon control reload these localized strings automatically. My Question: Any suggestions or code examples would be greatly appreciated! Thanks in advance! Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
I found that user can change the button label or description as fowlling shows: |
Beta Was this translation helpful? Give feedback.
RibbonApplicationMenu Label is a fixed text. Language of this text is the Windows installation language.
This is by Microsoft design. I can not change this feature.
In Windows 7 there was only an icon without text in the RibbonApplicationMenu.
Other text elements in the Ribbon you can change as you described in the comment before. You had done a good job.