Warpin
Warpin

Reputation: 7043

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 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?

Upvotes: 13

Views: 6771

Answers (4)

Mihai Nita
Mihai Nita

Reputation: 5787

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)

Upvotes: 6

Devis machhi
Devis machhi

Reputation: 1

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

Upvotes: 0

John Knoeller
John Knoeller

Reputation: 34148

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.

Upvotes: 0

Hans Passant
Hans Passant

Reputation: 941465

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.

Upvotes: 12

Related Questions