Reputation: 12833
I think I get it, but a couple of aspects are confusing me. Say I want strings localized for MyApp in Germany, Spain and the USA.
MyApp.resx
MyApp.de-DE.resx
MyApp.es-ES.resx
MyApp.en-US.resx // this *feels* redundant
The last rex file ("en") will have the same keys and values as the "neutral" one since I am an American developer, but ... do I need both?
I can guess at the answers but it seems confusing despite, or maybe because of, all the msdn docs explaining the ultimatefallback, satellites, and neutral language.
Can someone experienced with international development explain why or why not in a (really) simple manner? And would it matter if I were doing WPF, Silverlight, ASP or some other .Net variation?
Cheers,
Berryl
Upvotes: 1
Views: 1433
Reputation: 1394
Agreed with Thomas. If main language for your application is en-us than you just place all your strings in main resources and all translations of this strings(such as German, French etc) at corresponding satellite resource files.
For example - main language is En-Us, but u also want to support british, german, spanish. So you place all original strings in default resource file, say Resources.resx. Then you create Resources.en-GB.resx, Resources.de-De.resx, Resources.es-ES.resx and place there translations of original strings.
If some of the strings are equal for american and british versions, you just delete this strings from Resources.en-GB.resx file. Because first satellite assembly will be examined for resource, and if resource string hasn't been found - main assembly version of this string will be used.
Upvotes: 0
Reputation: 292345
If the resources in the main assembly (MyApp.resx) are in the en-US culture, you don't need to create a MyApp.en-US.resx file. If no satellite assembly is found for this culture, the resource manager will fall back to the resources in the main assembly.
Upvotes: 5