Version 5 - Support for named resources
All previous versions of the Add-In have used the function ml_string() to localize texts in the program source code. This goes right back to the first version for VB6.
This function has two characteristics:
- it uses a numeric string ID
- it includes the original string as a parameter, but really it is just a comment
I personally have never liked using resource names as place-holders for texts in the source code. I prefer to see the original text, which I find makes the code more readable.
However, in most points I tend to follow the principle: "Do it the way Microsoft recommends". Anything else is like swimming against the stream. And there is no doubt, Microsoft recommends using named resources in the program source code.
In version 5 of the Add-In, I have given up my resistance to using named resources. There are now two methods to localize strings in the source code:
- using named resources
- using ml_string()
When you start working with a new project, you have to choose between these two methods. If you select named resources, then neither the MlString module, nor the resource file MultiLang.resx will be added to the project. You can modify this option later using the project properties dialog, but that won't automatically change any prior localization.
Internally, resources are still assigned numeric IDs, but strings which are used in the source code are also given resource names and stored in the standard resource file resources.resx.
All named resources are also shown in the "Additional Resources" tab. (I will probably remove the word "Additional" soon.) The resource names are based on the original text, so for example the resource name for "Hello World" would be Hello_World. The names are limited to about 30 characters and may have a numeric suffix for disambiguation. If you don't like the name, then you can edit it in the "Additional Resources" tab. (I'm not sure that this is good user interface, but I am reluctant to add another column to the source code grid.)
At present there is no way to remove unused named resources. The function "Remove unused String IDs" ought to do this, but I know it needs fixing.
The previous version (4.7x.0136) is still available on the download page (in case I have broken something critical), but version 5 is now the official version. I look forward feedback from users on this new feature.
Phil