Using this answer, I created a sample localized app. My question is, is there some way to have Visual Studio automatically generated the strings.fr.resx file with the same strings (same names that is, with blank values), so someone who knows French can just fill them in, or do I actually have to manually create the resource for each language I want to support?
Resource files (. resx) are only generated with source code when building a Project in Developer Studio.
resx file? If so, go to project properties, then the "Resources" tab, and there should be a big link to click to regenerate it.
You do not need to deploy . resx file with your application.
You can do this with a 3rd party tool: Zeta Resource Editor
What's nice about using this tool is that you can also use it to export/import your translations to a spreadsheet for translations. (You can do this from the "Start" tab)
Alternatively, you could write your own small program to do this. The heart of the program is this:
using( ResXResourceReader reader = new ResXResourceReader( resourceFileName ) )
using( ResXResourceWriter writer = new ResXResourceWriter( newResourceFileName ) )
{
foreach( DictionaryEntry entry in reader )
{
writer.AddResource( entry.Key.ToString(), "" );
}
writer.Generate();
writer.Close();
}
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