本地化支持在c ++ win32项目中使用resx文件? [英] Localization Support using resx files in c++ win32 project?

查看:56
本文介绍了本地化支持在c ++ win32项目中使用resx文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我可以使用resx文件轻松找到有关本地化支持的信息,但很难找到有关转换我的c ++ win32项目的一些信息使用resx文件格式(如c#)使用本地化支持。


有没有办法可以将.rc文件更改为.resx格式并从resx文件格式加载字符串?


任何人都可以提供一些信息......


感谢您的帮助




此致,Ravi Raj Nukala

解决方案

您好Ravi Raj Nukala,


感谢您在此发帖。


根据我的搜索,我找不到将rc文件更改为resx文件的方法。我相信resx文件便于本地化支持。


如果您的C ++应用程序是MFC程序,RC文件也可以解决本地化支持。


我的这篇简短的代码项目文章演示了如何轻松地从代码中的字符串表中提取字符串。


您可以翻译资源并创建资源DLL(也称为附属DLL)。我们的想法是为每种语言保留.rc文件的不同副本。每个翻译都被编译成
无代码 DLL,作为资源的容器。


我的另一个代码项目文章让您可以根据系统设置或用户首选项轻松加载资源DLL。该代码还可以让您轻松构建一个包含所有可用$的菜单b $ b语言


所以我认为MFC rc文件可以解决本地化支持问题。


如果你的问题已经解决,请记得关闭你的帖子将有用的帖子标记为答案,这对于有同样问题的其他人有帮助。


最好的问候,


Hart


Hi,

I could easily find the info on Localization support using resx files for a c# project, but it is hard to find some info on converting my c++ win32 project using the localization support using resx file format like c#.

Is there any possible way that i can change my .rc file to .resx format and load string from resx file format??

Can anyone give some info...

Thanks for the help


Regards, Ravi Raj Nukala

解决方案

Hi Ravi Raj Nukala,

Thank you for posting here.

Based on my search, I cannot find a way to change the rc file to resx file. I believe that  the resx file is convenient for localization support.

If your C++ application is MFC program, the RC file can also solve the localization support.

This short codeproject article of mine demonstrates how to easily pull strings from the string table in your code.

You can translate your resources and create resource DLLs (aka satellite DLLs). The idea is that you keep a different copy of the .rc file(s) for each language. Each translation is compiled into a codeless DLL that acts as a container for the resources.

This other codeproject article of mine lets you easily load resource DLLs according to system settings or user preferences, The code also lets you easily build a menu with all available languages

So I think the MFC rc file can solve localization support issue.

if your issue has been resolved, please remember to close your thread by marking useful posts as answer that can be helpful for other person with same issue.

Best Regards,

Hart


这篇关于本地化支持在c ++ win32项目中使用resx文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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