Localizer - Frequently Asked Questions
I want to refresh the language files without using Delphi IDE. Is there any command line option to refresh language files please? Kindly advise.
To let customers to automate the build process we supply the LocRefresh utility that is intended to perform refreshing via command-line call. You may find it in "localizer\utils" folder.
The utility manual is available in Localizer's help file, "LocRefresh utility" section. I quote from this article below:
Localizer have LocRefresh utility (see ..\KLib\Localizer\Utils\LocRefresh folder). It allows you to refresh language files from command line (without IDE);
The command line to use this utility must be:
LocRefresh <Delphi project file name> [options]
Possible options are:
-pefile:<EXE file name> - allows to specify PE (portable executable) file (.EXE, .DLL or .OCX) generated by the localized project. Use this options if the result PE file is placed outside of the project folder;
-langdir:<path to language files folder> - allows to specify path to the folder where language files for this project are placed. By default LocRefresh searches for language files in the project folder so -langdir option can change this behaviour;
-action:<action_name> - specifies type of action LocRefresh should perform on this call. Possible values are:
full - default behaviour. Makes all necessary operations;
init - initializes the refresh process, increase localization version number and update .klr file which is included into result .EXE (or .DLL) file. Must be called before project compilation;
perform - activates the main part of refresh process which was initialized be previously called init action;
-nowait - this option allows LocRefresh to continue its work after possible error occured during refresh process. By default LocRefresh stops its work after each error and plays beep sound.
The command-line for project compilation must include -GD (or --drc) option which tells linker to generate .drc file for your project. That file contains information about resource strings used in the program. Localizer reads .drc file to refresh resource string constants stored in native langauge file. Example:
dcc32.exe --drc -B yourproject.dpr
Usual sequance of project build process will be the following:
rem --- first call of LocRefresh (for initialization) ---
locrefresh.exe yourproject.dpr -pefile:yourproject.exe -action:init
rem --- project compilation ---
dcc32 -B --drc -U<library path> yourproject.dpr
rem --- second call of LocRefresh (to update language files) ---
LocRefresh.exe yourproject.dpr -pefile:yourproject.exe -action:perform
In case you use "Link languages into EXE" option (see Project Settings dialog for information about it) then you should compile and build your project twice: before and after calling LocRefresh utility. Both calls (before and after) must be totally equal (all directives and compiler options in both call must be the same).
Enter your comment:
Subscribe to comments
Back to top
(c) Copyright 1998-2014
. All rights reserved.