Managing strings stored in resource files of a localizable application

  • Thread starter Thread starter Maksim Izbrodin
  • Start date Start date
M

Maksim Izbrodin

We are working on a localizable application created using
Visual C# .NET 2003 with the UI strings stored in all the
separate localized resource files. Are there any means to
automatically verify that all the strings used in the
code (referenced by resource entry names) are defined in
the resource files?
When we used Visual C++ 6.0 such kind of verification
always performed automatically at compile time and we
didn't have to care much about it (the resources were
accessed by IDs which were defined in resource.h file and
a reference to any missing ID resulted in a compilation
error).
Thank you,
Maxim
 
Hi Maxim,

Thanks for your post. In Visual Studio .NET, localized resources (data such
as strings and images appropriate to each culture) are stored in separate
files and loaded according to the UI culture setting. Please refer to the
following articles for detailed information:

Hierarchical Organization of Resources for Localization
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbconhierarchicalorganizationofresourcesforlocalization.asp

Localizing Applications
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbconInternationalApplicationsInVisualBasic.asp?frame=true

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Thank you for your reply, but the question was different.
I know that the resources are stored in separate files.
The question was: "Are there any means to automatically
verify that all the strings used in the code (referenced
by resource entry names) are defined in the resource
files?"
 
Hello Maxim,

Thanks for your response. As you know, the ResourceManager.GetString is
referenced by the name of the resource so that the compiler is not able to
verify. You may be able to write a tool which examine the source files to
pick out the ResourceManager.GetString() calls and verify the resource
names, however, it will be difficult to implement if the String resource
names are stored in String variabls instead of constant values.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top