Step 5: Adding and removing resource strings  Previous topicNext topicFirst topicLast topic



Step 5: Adding and Removing Strings From The RES File <--Back Next-->

IT IS WISE TO CAREFULLY INSPECT EACH STRING AT THIS STAGE!
The time you spend at this stage will save you time by correcting string that are inappropriate for the Resource file or are going to be accidentally omitted from the Resource file. This is especially important if you intend to localize this application to another language.
Be sure to look at the
string processing feature when viewing a file.

After pre-processing the project, the strings that are going to be left intact and those being moved to the .RES file are shown. You have the ability to change the status of each string by forcing a string to be added the .RES file or forcing it not to be moved into the .RES file. It is not possible to remove a string from the resource file if the string was imported from the existing original .RES file. (Doing so would cause a compiler error when the missing string is accessed from the .RES file.) Forcing a status change of a string will override all disqualification keyword phrases for new strings. However, built-in disqualifiers related to things like PropertyBag and Err.Raise cannot be overridden.

WARNING! You can manually place any string in the Resource file yourself with VB's editor, but some strings should never be placed in a Resource file. For example, you will very likely get a runtime error or undesirable results if you decide to manually move strings from things like PropertyBag, Err.Raise, and Const assignments into a resource file yourself. This is not recommended.

When a string in either List box is selected, the usage of that string is shown along with the number of times that string was used in the project. This is a powerful feature because you can see the context of the string's usage across ALL of the project's files, without having jump around from file to file. You can
view the file containing a line of code by double clicking on the line of code. Another powerful feature is the ability to optionally hide obvious resource strings so that you can rapidly focus on those strings that might require more careful inspection.

Project strings can be viewed all at once or on a file-by file basis.

A powerful option is to view strings according to their usage in source code. Under the Options menu, strings can be sorted according to how they are used. This helps identify reoccurring string usage that possibly should not be moved to the resource file. It is also possible to view only suspect strings that are used in Case statements or If statements where translations might interfere with proper program execution.

Another powerful feature is to change the string disqualification rules and then reprocess the project's strings. Let's say that you have been looking through all the strings headed for the resource file and you noticed a pattern to certain types of strings that either should be in the resource file or shouldn't be there. After a while you might want to apply this pattern on a global basis to all the project's strings. You can go back to change the string disqualification rules and then reprocess all the project's strings. This is done by selecting "Modify String Disqualifications..." function under the Edit menu. Once you have made your pattern changes, the entire project is quickly reprocessed according to the new rules that you specified. A special display of only the affected strings is shown so that you can inspect the impact of your new string rules. This can be repeated as many times as you like.

It is also possible to save the current state of your processing by using the "Save Current Processing" function under the File menu. This allows you to close down, go home, and start up tomorrow where you left off. You will resume right where you were if you use the resume function under the File menu on ResMe.




You are almost ready to process the strings in your project.

Click next to continue the tutorial.
<--Back Next-->