I work on a product where we have to worry a bit about localization. Currently, this is the workflow for when I have to use(or add) a localized string:
ResourceFactory.ResourceMgr.GetString("MY_MAGIC_STRING")
(where ResourceMgr
is just a static field to a ResourceManager)This 3 step process for any strings is a real pain. Are there any patterns or ways to make this process easier?
Auto-generated files with access to each individual string are much easier to use - set "Custom tool" for RESX file to PublicResXFileCodeGenerator
.
Code would look like:
using MyProject.Resources;
...
localizedText = Resources.SomeReasonableName;
Side notes:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With