Reputation: 331
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
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.
Upvotes: 3
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:
MENU: Project > Properties
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