我在哪里翻译MFC消息框

问题描述:

我正在将MFC应用程序本地化为日语,并且资源正常运行.

I'm localizing an MFC app into Japanese, and have the resources working right.

我当前的问题是,当我使用AfxMessageBoxMessageBox时,对话框标题和按钮消息以英语显示,而我却找不到任何地方可以更改它.

My current problem is that, when I use AfxMessageBox or MessageBox, the dialog title and button messages come up in English, and I haven't found anywhere to change that.

我没有发现对搜索MSDN或Google有用的任何东西.

I haven't found anything useful searching MSDN or Google.

所以

这项工作吗? Windows是否提供日语,阿拉伯语和俄语的确定"或是/否"按钮?

Does this work? Does Windows come up with "OK" or "Yes/No" buttons in Japanese, Arabic, and Russian?

如果没有,我该如何指定更改这些内容?

If not, what do I specify to change these?

我选择了MessageBoxEx,编写了一个包装器类,以使其与AfxMessageBox一样方便使用.看来MB_OK在英语和日语中都显示为"OK",但是其他按钮选项(例如MB_YESNO)被翻译为我认为正确的日语.这是一个很小的翻译应用程序,我们可能想对较大的应用程序使用自动化的工具.

I went with MessageBoxEx, writing a wrapper class to make it as convenient to use as AfxMessageBox. It does appear that MB_OK comes up as "OK" in both English and Japanese, but other button options like MB_YESNO are translated into something that I assume is correct Japanese. This was a fairly small application to translate, and we might want to use something automated for the larger ones.

使用 MessageBoxEx 并指定WORD wLanguageId字段.

Use MessageBoxEx and specify the WORD wLanguageId field.

wLanguageId [输入]指定消息框中显示的文本的语言 纽扣).指定零值 (0)表示显示按钮 使用默认系统语言的文本. 如果此参数是 MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),当前语言 与调用线程关联的是 使用.

wLanguageId [in] Specifies the language for the text displayed in the message box button(s). Specifying a value of zero (0) indicates to display the button text in the default system language. If this parameter is MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), the current language associated with the calling thread is used.

要指定当前语言以外的其他语言,请使用 MAKELANGID宏来创建这个 范围.有关更多信息,请参见 MAKELANGID.

To specify a language other than the current language, use the MAKELANGID macro to create this parameter. For more information, see MAKELANGID.

有关 MAKELANGID 的更多信息,

如果这对您而言不合适,则可以选择制作自己的对话框.

If this does not work well for you, the alternative would be to make your own dialog box.