开发者

How to retrieve a localized text/caption for standard push button?

开发者 https://www.devze.com 2022-12-21 06:06 出处:网络
I want to add \"Yes\" and \"No\" buttons to my window. It\'s a bit similar to standard MessageBox, so I would like to use localized strings in these buttons. I.e. \"Yes\" and \"No\" should be written

I want to add "Yes" and "No" buttons to my window. It's a bit similar to standard MessageBox, so I would like to use localized strings in these buttons. I.e. "Yes" and "No" should be written in OS's current language.

How can I do this?开发者_C百科


No easy answer. You can try getting a translation glossary from Microsoft, or use thier online translation tool (more on both here).

Other "hacks" involve reading the string resources of user32.dll - but this will only work for localized version of the OS (i.e., not if you're using MUI, which sits on top an EN-US version).

I like the online translation or glossary approach as it proofs the app from any future API changes.

0

精彩评论

暂无评论...
验证码 换一张
取 消