Is there any way to obtain the localized names of common dialog buttons?
Is there 开发者_Python百科a way to get the localized versions of "Yes", "No", "OK", "Cancel", "Abort", "Retry", and "Fail"? I'm designing a custom dialog and it would be very useful to be able to localize the buttons automatically.
I would be surprised if this information was available through the Windows API, but it does not hurt to ask!
yes,
there is as well, Microsoft Terminology Collection. Not only Yes/No dialogs, but every other sentence that is used in windows.Hope this work for you.
You may have a look at that site, there are some useful things
I'm afraid there is no official way to do that. There are several tricks to hook system window/dialog appearance and get BUTTON control's text form it. In this case you will avoid actually static linking on windows resource, like provided in link, but will dynamicalyy recover string "as is".
But consider that, after you will jump into Windows API compatibility issues, 32/64 bit issues and so on. This is complete mes.
I personally, would implement my own "messagebox" and localize it base on application choosed language.
精彩评论