Table of Contents
Scripts are usually integrated into the Lokalize UI as menu actions (to which you may assign a keyboard shortcut).
The location and name of the menu entry for the script is defined in its accompanying .rc file.
On each project open, Lokalize scans
PROJECTDIR/lokalize-scripts folder for .rc files and adds them to a cache file called
PROJECTDIR/lokalize-scripts/scripts.rc (so you shouldn't generally want to add it project's version control system).
RC files also contain script paths, which may be relative to .rc file folder, or to a system scripts folder - they both are tried (though they should be kept in a relative location if you want to share them with other people in your project).
For example, you can specify
../../scripts/lokalize/opensrc.py to load a script from the global kf5-l10n scripts folder (i.e. not specific to your language).
Examples of .rc files may be found in Lokalize install folder (usually
and in the KDE repository.
check-gui.js that runs automatically on each file save
(this is achieved via special option in .rc file).
Below are links to API references. Everything marked as Q_SCRIPTABLE may be used from scripts.
One of the best scripting capabilities application is the use of Pology in Lokalize.
The interaction with Pology can be configured using the page Pology of the configuration window which can be opened by choosing the → main menu item.
For more information, please refer to Pology homepage.