开发者

Visual Studio resource editor: there can only be one string table?

I created a string table in my .rc file containing my English strings - now I need 开发者_Go百科to add another string table for a different language.

If I try to do:

Add Resource... -> String Table -> New

I get the error: "there cannot be more than one instance of this type".

I know I can open up the .rc file in notepad and add language in there but how am I suppose to do this from inside Visual Studio?


Yes, it is very well hidden. Double-click the .rc file in Solution Explorer to open the Resource View window. Expand the String Table node, right-click "String Table" and select "Insert Copy". That takes you to the language selection combo.


As nobugz mentioned, you can only have one string table per language.

But back to the bigger picture: is is considered a bad practice to store several languages in one executable/dll. The "best current practice" is to have resource-only dlls, one per language. Then you have full control on what language is loaded (otherwise you let Windows do the decision for you).

Take also a look at the MUI API (http://msdn.microsoft.com/en-us/goglobal/bb978454.aspx, especially the "Getting started" section on the left)


In the end, there can be only one. (sorry, I couldn't resist).

It will let you add a table if it isn't the same language as the current table, Try changing the language on your current string table to something else "Basque" maybe, then add the new table, then change it back.


Create a new resource file and add new string table with the same language. I hope it will work ...I tried it..!!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜