dancer_69
dancer_69

Reputation: 331

How to add resx file in visual studio express 2012?

screenchot:AddNewItem I'm trying to localize my WPF project, but it seems that there is no option to add a .resx file?

There is a resource file in project's directory which is for all resources(strings, images, audio files etc). But from my understanding, you can add strings for only one language.

Upvotes: 4

Views: 13679

Answers (2)

Typist
Typist

Reputation: 1474

Add separate resource file (.resx) for each language and use them by changing the thread UI Culture - http://www.thebestcsharpprogrammerintheworld.com/blogs/localizing-a-wpf-program-using-csharp.aspx.

See following screen-shot. Right-click on project -> Add -> New Item. Name your file according the culture you want. I named it for Dutch language.

enter image description here

Upvotes: 3

user3624833
user3624833

Reputation:

You can do a similar thing if you go to your Project's Properties, and then go to the "Resources" tab there.

Multiple ways to get to Project Properties:

  1. MENU: Project > Properties

  2. Solution Explorer: Expand the project so the "Properties" node is visible. Double-click on it.

Another way (if you really want to add a file) is to right-click on your project (Solution Explorer) and click Add New Item. Here, on the left-hand side select "General" and on the right-hand side select "Resources File".

Upvotes: 1

Related Questions