Catch local resources in resx files

I have many resource files in different languages.

Suppose, for example, that we support 3 languages ​​(en, de, fr) and have this file:

common.resx common.de.resx common.fr.resx

I would like to detect cases where, for example, a resource is requested in de but is missing and therefore reverts to the default language. Is there any way to catch this? (so I can register it and add the missing resource later).

thanks

+7
resources localization
source share
4 answers

If you want to catch the differences, use the RESX Synchronizer . This is an open source application that can synchronize all the differences from the main resx to the localized one (it adds and / or deletes keys in the localized resource).

You can use it as follows to copy all changes from common.resx to common.de.resx:

resxsync /v common.resx common.de.resx 

The / v switch lists all changes that are all keys that have been added or removed from de resx.

+5
source share

Assuming that all changes to the resource file begin during the development process and are made, this seems to work for some form of static analysis.

I use Zeta Resource Editor because it highlights areas where there are no translations, as well as placeholders (for example, {0} ).

+2
source share

Resharper has this great feature http://www.jetbrains.com/resharper/features/internationalization.html#Code_Inspections_for_Resource_Files

ReSharper warns you when a specific resource value is not overridden in a specific culture

+1
source share

There is nothing in the existing read API to display external backups. However, System.Resources.ResourceManager is not sealed, so you should not subclass it to raise an event when a backup is required.

0
source share

All Articles