Home > Software engineering >  VC multilingual software development (multiple RC resource files)
VC multilingual software development (multiple RC resource files)

Time:12-20

Projects need Chinese version and English version, the development environment vc2013, Windows 7 system, prepared in a engineering maintenance 2 RC resource files at the same time, using the software in English and Chinese share the source code, through different configuration can be compiled for the Chinese version, can also be compiled to English version, now has two RC resource file will be added to the project, but I don't know how to configure (for example in the project Settings to select different RC files), you can do me a favor, online, etc., thank you

CodePudding user response:

Why use two resource files? A resource file can support multiple languages

CodePudding user response:

Multilingual switches generally there are two ways:
1. Switch repository implementation
2. Dictionary library

For switching implementation repository, usually put their resources are compiled into a DLL, by calling in the exe AfxSetResourceHandle way to switch the current resources so as to realize the switch of languages
Advantages: 1. Implement a simple
2. For different languages, can modify the corresponding resources to adapt to the interface, there will be no interface according to the problem of incomplete
Disadvantages: 1. The resource DLL is more, if you want to support more languages extremely convenient
2. Unfamiliar with the language, oneself can't translation, also impossible to others to translate (repository, dialog box, menu, etc. These resources, translation company can't help you modify these things)

Dictionary library realize the language switch, achieve relatively complicated, the principle is the enumeration of all resources in the software, the record of these resources in Chinese string in the dictionary, the dictionary of separately according to the different language into different string,
Software interface rendering from the dictionary library to retrieve the corresponding translation string for display on OK,
Advantages: 1. You can switch any language, as long as you can translate, convenient switch
2. The translation of the third party will not limited by resources project source files, can always translate
3. Switch languages without AfxSetResourceHandle resources, more convenient
Disadvantages: 1. Because do not need to modify the interface to switch languages such as resources, will lead to switch to a different language, text interface may show incomplete

CodePudding user response:

https://msdn.microsoft.com/en-us/library/1021kkz0.aspx

CodePudding user response:

1/f, has made it clear that resource DLL, is commonly used in the resource. H and. Rc file copy, to build a resource DLL file separate translation, if after the increase, so the corresponding h and rc respectively manually add!!!!!!!!!!!

Do more than Microsoft VC language is so painful! QT multilingual, knock several command line synchronization, lupdate lrelease can, only need to be translated added a few is ok!!!!!!

If Microsoft can put this function should be, that is pretty cool!

CodePudding user response:

CodePudding user response:

In addition to language and other different? If the other are the same
Completely can make independent language files, a file, and then according to the language respectively just read
Other ICONS of what, if different can also be addressed by packaged software, such as the inno setup
This way of different language compiler switch to behind often turns into a pot of porridge,

CodePudding user response:

Use SOUI support multiple language is simple,
http://www.cnblogs.com/setoutsoft/p/6743006.html

CodePudding user response:

Wangningyu
reference 4 floor response:
1/f, has made it clear that resource DLL, is commonly used in the resource. H and. Rc file copy, to build a resource DLL file separate translation, if after the increase, so the corresponding h and rc respectively manually add!!!!!!!!!!!

Do more than Microsoft VC language is so painful! QT multilingual, knock several command line synchronization, lupdate lrelease can, only need to be translated added a few is ok!!!!!!

If Microsoft can put this function should be, that is pretty cool!

VC itself can add different language versions in a resource, and the runtime system will automatically according to the system to select the appropriate language version,

CodePudding user response:

refer to the eighth floor yjryym response:
Quote: refer to 4th floor wangningyu response:

1/f, has made it clear that resource DLL, is commonly used in the resource. H and. Rc file copy, to build a resource DLL file separate translation, if after the increase, so the corresponding h and rc respectively manually add!!!!!!!!!!!

Do more than Microsoft VC language is so painful! QT multilingual, knock several command line synchronization, lupdate lrelease can, only need to be translated added a few is ok!!!!!!

If Microsoft can put this function should be, that is pretty cool!

VC itself can add different language versions in a resource, and the runtime system will automatically according to the system to select the appropriate language version,


A great trouble to maintenance, there is no way to automatically sync, you add any control, the other languages need to manually add a plait, interface and control more really doesn't fit, inside this QT multilingual completely kill VS

CodePudding user response:

Don't use multiple resources
Use ini, reference multilingual realization way of android and ios
  • Related