Using the translation editor in Loco Translate
The visual editor in Loco Translate lets you edit translation files directly in WordPress admin and save them to the correct file formats for WordPress to use.
The editor can edit PO and POT files. The difference being that POT files are templates containing only English source strings. PO files contain the actual translations. These are what you'll be editing most of the time.
The editor is split into several panes. The top half is a list of all the English strings you can translate. Bold, blue items are untranslated; Brown items are Fuzzy. You can use the arrow keys to move up and down the list. The currently highlighted item is editable in the panes below.
With an item selected you will see the English "Source text" in the panel below the list. This is the text that the author wants translating. It may have other information in smaller text. Enter your translation in the bottom pane.
You'll notice that you can't edit the source text. This is deliberate, because changing the source text would stop your translations from working.
The editor layout is slightly different when editing POT files. Instead of the bottom pane being for a translation, it is where you enter "Context". This is used in combination with the source text to make strings unambiguous.
Editing a template manually should be avoided unless you're the author of the theme or plugin being translated. Read more about working with templates.
The editor toolbar
You'll notice as you make changes that items you've translated show a :star icon:. This means your changes are unsaved. You can keep making edits, but we recommend you save your work regularly.
As soon as you click "Save" Loco Translate will commit a new PO file to your server's disk and also compile a new MO file. It's the MO file that WordPress will load to display your translations.
Saving files requires permission to write to your server's disk. See our guide to file system access if you have any problems with this.
The button with the :sync icon: updates your translations from the source strings available. If any have changed since you last saved your file, you will see new ones added and any obsolete ones will be deleted.
Syncing doesn't save any changes until you click Save, so it's safe to try it out and see what it does. Just reload the page or click the :Revert icon: to go back to the saved state.
Note that Loco Translate doesn't [yet] perform fuzzy matching during sync operations.
This button simply refreshes the page. You will be warned if you've made unsaved changes since the page was last loaded.
The button with the :cloud icon: toggles the "Fuzzy" state of a completed translation. The same function can be performed by pressing Ctrl-U on your keyboard. Fuzzy strings are those that may be incorrect and are waiting for a translator to review them. They may not appear on your site depending on your settings.
If you're unable to save your file due to permission problems, you can download the current state of the file in PO, MO or POT format depending on what you're editing.
Your changes will still be "unsaved" as far as the editor is concerned, but your translations should be safe instead the downloaded file. You (or your web developers) can then upload these files to your server some other way.
The following keyboard controls are supported by the editor:
- Ctrl ↵ Done and Next
- Ctrl ↓ Next message
- Ctrl ↑ Previous message
- ⇧ Ctrl ↓ Next untranslated
- ⇧ Ctrl ↑ Previous untranslated
- Ctrl B Copy from source text
- Ctrl K Clear translation
- Ctrl U Toggle Fuzzy
On a Mac? You can use ⌘ Cmd instead of Ctrl.