Page tree
Skip to end of metadata
Go to start of metadata

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
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)"/>

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:

  1. activate a project-specific metalanguage (radio button) – this copies config files to your usr folder to allow modifying and using a project-specific VB7Lang.vbi
  2. 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 your proj\usr folder
  3. select/edit the desired metalang script in the usr folder and make the desired changes
  4. Save your changes
  5. 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.

  • No labels