简体   繁体   English

.rc文件中的本地化

[英]Localization in .rc files

My application is localized for multiple languages (write in VS2005 in c++). 我的应用程序针对多种语言进行了本地化(用VS2005用c ++编写)。

What would happen if the application is run in a language whose localized files does not exist? 如果应用程序以不存在本地化文件的语言运行,将会发生什么? For instance I have not localized for Dutch. 例如,我还没有本地化为荷兰语。 what would happen when its run on a Dutch pc? 如果在荷兰PC上运行会发生什么?

The load order is: 加载顺序为:

  1. Primary language/sublanguage 主要语言/副语言
  2. Primary language 主要语言
  3. Language-neutral 与语言无关
  4. English (skipped if primary language is English) 英语(如果主要语言是英语,则跳过)
  5. Any 任何

(Taken from MSDN Blog ). (摘自MSDN博客 )。

So in your case you might end up with any of the languages you put in the ressources. 因此,根据您的情况,您最终可能会使用资源中放入的任何语言。 If you want to influence the language taken, you can set the threads locale before loading a ressource. 如果要影响所使用的语言,可以在加载资源之前设置线程的语言环境。 That's the way I did in programs: if locale is German, then keep it, otherwise change it to English so that international users always see the English GUI. 这就是我在程序中所做的方式:如果语言环境是德语,则保留该语言环境,否则将其更改为英语,以便国际用户始终可以看到英语GUI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM