Fig. above shows a possible scenario
With the ".NET Edition“ of Visual Localize (version 4.X), we have introduced an opportunity for all users to automate recurring localization tasks for their localization project.
For this purpose Visual Localize uses a script file (*.vls e.g. “visloc.vls”) which contains defined instructions.
These instructions or operations (for example: -reload, -importdic, -createfiles) will be executed automatically by Visual Localize one after another.
In order to automate your recurring localization tasks with a script file (*.vls), please carry out the two steps below:
A) Create a shortcut from „Visloc.exe“ to your script file
B) Create your script file
Below you will find a detailed description of these steps.
Step A: Create a shortcut from “Visloc.exe“ to your script file
1. Create a shortcut to “Visloc.exe”
Use your Microsoft™ Windows Explorer to open the directory where Visual Localize is installed.
For example: “C:\Program Files\Visloc\”. Use your right mouse button to click on the file “Visloc.exe”. Then click on the “Create shortcut” item shown below:
The new shortcut “Shortcut to Visloc.exe” is added to the same directory.
Copy the “Shortcut to Visloc.exe” to your project directory by using “Copy”/ “Cut” and “Paste”.
2. Change shortcut properties
Click with the right mouse button on the newly created “Shortcut to Visloc.exe”. Then please select the item “Properties”.
The dialog below will be opened:
1. Click on the tab “General” and rename your shortcut. If you want to automate different localization tasks for different localization projects, please use unique names for each shortcut. For example: “Create_target_file_for_demo_project”, “Reload_files_in_demo_project”
2. Click on the tab “Shortcut”.
3. Change the path in the “Target” line to the following syntax:
4. Change the path in the text field “Start in:” to “[Drive]:\[Path_to_Visual_Localize]\Visloc.exe”.
5. Click the “OK” button.
The correct syntax for the “Target” is written with a blank between “…\Visloc.exe” and ”-“. This is the only blank in the “Target” syntax. (There is no blank between the colon and the drive letter! In the screenshot above the red arrow (No. 3) points exactly to the sensitive point in the syntax.) In the following sample screenshot this location is marked with a red underscore:
1.3. Run script
By double-clicking on the shortcut all operations within the automaton script (e.g. “visloc.vls”) will be executed. After proceeding Visual Localize will close.
Step B Creation of script file
This “visloc.vls” file is normally stored in the “Visloc” directory. You can use this sample script file as a template for other scripts. However, it can also be created with a text editor (e.g. Notepad). In this case the file extension must be set manually to “*.vls”.
You can create more than one script file (*.vls) when you require different script operations.
For the automation of different localization projects you will have to create multiple shortcuts which refer to the corresponding script files. If you use multiple operations in ONE script file, Visual Localize will execute them one after another.
It is very important that each shortcut refers to the correct script.
Possible operations (via script file)
The following operations can be used in the Visual Localize script file:
1. RELOAD: This operation reloads all program modules in your Visloc project after a software update or a new release.
2. IMPORTDIC: This script operation imports a Visual Localize dictionary into your Visloc project.
3. CREATEFILES: This script operation generates target files (also .NET satellite assemblies = *.resources.dll) of your localized project files.
The following syntax is required for the automation of localization tasks:
Syntax for reloading program modules in your Visloc project file:
Syntax for importing a Visual Localize dictionary into your project file:
importdic "[Drive]:\[Path_to_your_Visual_Localize_project_file]\[Name_of_your_project_files].prj" "[Drive]:\[Path_to_your_dictionary]\[Name_of_dictionary].dic" /add /replace /ignore
Optional parameters for importing a dictionary (at the end of the command line):
/add: Imports all phrases (default translation and exceptions) from your dictionary and adds them to your Visloc-project.
/replace: If there is an import conflict because of an already existing translation, all conflict phrases will be replaced with the translation of the imported dictionary.
/ignore: Only new translations will be imported from the dictionary. Existing translations in the localization project remain untouched.
Syntax for creating target files from a localized project file:
createfiles "[Drive]:\[Path_to_your_Visual_Localize_project_file]\[Name_of_your_project_files].prj" "[Drive]:\[Destination_path_for_target_files]\" /net /o
Optional parameters for creating target files (at the end of the command line):
/net: To generate .NET satellite assemblies (*.resources.dll) from all .NET framework basic assemblies (*.EXE, *.DLL) in your project file. Otherwise the file will be written back to the base assembly.
/o : To overwrite existing target files automatically.