I just can\'t seem to get localization to work.
I have a class library. Now I want to create resx files in there, and return some values based on the threa
In general you put your translations in resource files, e.g. resources.resx.
Each specific culture has a different name, e.g. resources.nl.resx, resources.fr.resx, resources.de.resx, …
Now the most important part of a solution is to maintain your translations. In Visual Studio install the Microsoft MAT tool: Multilingual App Toolkit (MAT). Works with winforms, wpf, asp.net (core), uwp, …
In general, e.g. for a WPF solution, in the WPF project
[assembly: System.Resources.NeutralResourcesLanguage("en")]
What you will see is that a new folder will be created, called "MultilingualResources" containing a ....nl.xlf
file.
The only thing you now have to do is:
(the .xlf files should open with the "Multilingual Editor", if this is not the case, right mouse click on the .xlf file, select "Open With…" and select "Multilingual Editor".
Have fun! now you can also see what has not been translated, export translations in xlf to external translation companies, import them again, recycle translations from other projects etc...
More info: