Support Statement: Making a new Metalang File
Question: So, I’m trying to get the code more readable by updating the VBASIC.XML file
I’ve made a number of changes to support things like:
If (Strings.Left(X,3) = "DT:") Then
To:
If X.Substring(0, 3) = "DT:" Then
Here is the change I made for the Left function:
<subcode id="Left">
<loc status="extension" narg="2" code="%1d.Left(%2d)"/>
<!--- - old code: <vbn narg="2" code="Strings.Left(%1d,%2d)"/> -->
<vbn narg="2" code="%1d.Substring(0,%2d)"/>
<jvs narg="2" code="Left(%1d,%2d)"/>
<csh narg="2" code="VBNET.Strings.Left(%1d,%2d)"/>
</subcode>
However, none of these changes are affecting the translation. What am I missing?
Answer:Â The VB6 language rules (aka the metalanguage scripts) must be compiled into the metalanguage file (vb7lang.vbi
) in order to impact the translations.
This is done on the settings form as follows:
- activate a project-specific metalanguage (radio button) – this copies config files to your
usr
folder to allow modifying and using a project-specificVB7Lang.vbi
- select the desired system default metalang script, (e.g.
VBASIC.XML
) you want to customize and right-click [activate project specific copy
] -- this copies the file to yourproj\usr
folder - select/edit the desired metalang script in the
usr
folder and make the desired changes - Save your changes
- Click [
Update Project Metalang file
] on the settings form – this compiles the metalang file using your modified script.
NOTE: Translation scripts, includes
, and COM IDFs do not have to be pre-compiled; they are usually processed each time you run a translation.  You can make the recompile operation part of the batch process on the batch setup dialog, this comes in handy if you are making re-translating and making changes to metalang scripts repeatedly.
You can also click [Update Project Metalang file
]Â from the Tools menu on the main form.