# The &lokalize; Handbook

Nick
Shaforostoff

    shaforostoff@kde.ru

2007
Nick Shaforostoff
&FDLNotice;
2008-01-22
0.2

&lokalize; is a computer-aided translation system that focuses on productivity and performance. &lokalize; applies a paragraph-by-paragraph translation approach when translating documentation, and takes a message-by-message approach when translating &GUI; components.

&lokalize;
localization
translation

## Introduction

When you start &lokalize; without any command-line arguments, you will see two big multi-line edits as well as a bunch of toolviews. These views can be stacked (similar to tabs), shown separately, or hidden. Translation files consist of many English-target pairs called messages. A message typically correspond to a single string in the user interface, or one paragraph in the documentation. The purpose of the first multi-line edit is to display the original part of the pair. The purpose of the second multi-line edit is to display the translation. You can navigate through the messages via the Catalog Tree view or by using Page Down and Page Up.

It is recommended that you get used to the keyboard shortcuts instead of the menus and toolbars for increased productivity. For example, use the Alt_ to switch between views when they are stacked into tabs, or AltQ to initiate a query when in the WebQueries.

## Projects

The projects are one of the main concepts in &lokalize;. A project is represented by a file that contains paths folders with translations, templates, and other files: glossary file, WebQuery scripts, translation memories. Whenever &lokalize; opens a file without a project loaded, it will search for a project file in the parent folders (up to four levels). Alternatively, you can specify the project file via the `--project` flag when starting &lokalize; from the command line.

Unlike project files, glossary and scripts, translation memories are not shared between the translation team members, as they are created and stored under the user's home folder, meaning that the translation memories for all of the projects are stored in the same folder and thus can be used when other projects are opened.

### Project View

The Project View displays a file tree with statistics such as the percentage of translated messages completed and the last translator. It allows you to open a selected file in the current, or in a new &lokalize;, window.

Use the middle mouse button to open a file in a new window.

The project file tree is accessible as a toolview in the editor and as a separate window.

### Operations on multiple files

Currently &lokalize; supports searching, replacing, and spellchecking within multiple files. Select the items that you are interested in, then choose the Find in files option from the context menu. The first match will be displayed in the usual &lokalize; window. You can then proceed by pressing the F3 button to find the next match. If you press the F3 button and there are no matches left in the current file, then the search will continue in the next file and so on. To reset the multiple file search state, press CtrlF in &lokalize;, and the editor window will reset.

## Glossary

Have you ever become tired of typing the same long text sequence several times just because it would take more time to find its translation for a copy and paste? Now you will only have to find the (frequent) word sequence in the Glossary View, and then insert it by pressing a shortcut.

Of course the glossary should be populated with word sequences first. &lokalize; has a handy glossary editor that allows an explicit search over the entire glossary.

## Translation Memory

The Translation Memory View allows you to drag and drop a folder with translation files from say Dolphin into the view, and then, within five minutes, translation suggestions will be shown automatically on the message entry switch. To insert the translation suggestions into the file, use Ctrl1, Ctrl2 and so on, depending on the number of suggestion.

## Synchronization capabilities

The Sync Mode (previously known as Merge Mode) saves a great deal of time for the editors, and for cases when two or more translators are working simultaneously on the same file, or when one has to maintain translations for several branches of software.

&lokalize; allows quick navigation through the messages that differ, and displays word-by-word differences. Also, &lokalize; has two Sync views - Primary Sync and Secondary Sync. They are identical, but the former is usually used to merge translations and second to keep in sync translations for two software branches.

After you copied translation from auxiliary file (synchronized it), any subsequent changes made to this entry will be replicated back to auxiliary file.

### Merging

One use of Sync Mode is reviewing changes made by (new) contributors, when you cannot be sure of the quality of the work done.

Open a base file, then drop its changed version into the Primary Sync view, followed by AltDown or Alt Up (remember that shortcuts may be modified in a usual way for all &kde; apps) to navigate through entries that are different.

### Synchronization

Sync Mode may also be used to make changes to translation for two (or even three -- using both Secondary Sync and Primary Sync) branches simultaneously. Set Branch Dir path in your project options to the path that corresponds to base dir of the branch, and Secondary Sync view will automatically open files from branch. Then, each time you make changes in files of your main branch, they will automatically be replicated to the branch (of course, if it contains the same english string).

## WebQuery

The WebQuery View lists the scripts that are defined project-wise as well as local client/program-wise. See an example script that works with the Google Language Tools as well as the project file for it, at .

## Credits and License

&lokalize;

Program Copyright © 2007-2008, Nick Shaforostoff shaforostoff@kde.ru

Some code was taken from &kbabel;, the &lokalize; predecessor.

Documentation Copyright © 2007-2008 Nick Shaforostoff shaforostoff@kde.ru

Author:

- Nick Shaforostoff shaforostoff@kde.ru

See the &lokalize; homepage for more details.

&underFDL; &underGPL;

&documentation.index;