与MFC对话的多语言 [英] multi language in dialog with MFC

查看:104
本文介绍了与MFC对话的多语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

i希望通过开发MFC / C ++创建一个多语言的程序

所以,我有一些xml文件,包含我所有的语言需要翻译

Ex:en.xml,fr.xml,jp.xml,language.xml

i已经阅读了我所有的* xml文件

现在,我想在用户单击对话框上的单选按钮时进行翻译。

如何获取此对话框的信息以从* .xml文件翻译语言。

Ex:id此对话框的ID,此对话框中所有控件的ID,以及此控件的类型

i希望我的dll在显示对话框时自动翻译

并且,请记住!这个程序是由dll翻译的,而不是程序上的另一个函数

plz,给我一些解决方案。

抱歉我的英语。

非常感谢

解决方案

因此你必须编写一个 DLL ,其函数能够解析 XML 文件,以便根据标识符返回字符串。对我来说这看起来非常简单,问题是什么?


我想我找到了解决问题的方法......

在对话框中枚举控件或FormView [ ^ ]

Hi all !!!
i want to create a program with multi language by develop MFC/C++
so, i have a few xml file, contain all my language need to translate
Ex: en.xml, fr.xml, jp.xml, language.xml
i have read all my *xml file
now, i want to translate when user click radio button on dialog.
how to get infomation of this dialog to translate language from *.xml file.
Ex: id of this dialog , id of all control in this dialog, and type of this control
i want my dll is auto translate when dialog is showed
And, remember that! this program is translate by dll,not by another function on program
plz, give me a few solution.
sorry about my english.
thanks so much

解决方案

Hence you have to write a DLL with functions able to parse XML files in order to return strings based on identifiers. It looks a pretty straightforward task to me, what is the problem?


i think i have found a solution for my problem...
Enumerate Controls In a Dialog Box or FormView[^]


这篇关于与MFC对话的多语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆