Is there a way to get localized names of common dialog buttons?

Is there a way to get the localized versions of Yes, No, OK, Undo, Undo, Retry, and Fail? I am developing a user dialog and it would be very helpful to localize the buttons automatically.

I would be surprised if this information was available through the Windows API, but this does not hurt to ask!

+6
source share
2 answers

yes

There is also a Microsoft Terminology Collection . Not only Yes / No dialogs, but also all other offers that are used on Windows. We hope this work is for you.

Perhaps you look at this site, there are some useful things.

+9
source

I am afraid that there is no official way to do this. There are several tricks to intercept the window / dialog box and get the BUTTON control text. In this case, you will avoid actually static binding on the Windows resource, as shown in the link, but dynamically restore the string "as is".

But keep in mind that after you go over to compatibility issues with the Windows API, problems with 32/64 bits and so on. This is the full version.

Personally, I would implement my own "mailbox" and localize it in the selected language.

+1
source

Source: https://habr.com/ru/post/895907/


All Articles