The widgets use KDE's standard i18n() translation system. All user-facing strings are already marked as translatable , you just need to provide the translations for your language.
template.pot → your_language.po → compiled .mo → bundled in widget
(source) (you translate) (build.sh) (install.sh)
- Each widget has a
template.potfile containing all translatable strings - You copy it to create a
.pofile for your language (e.g.,nl.pofor Dutch) - You translate the strings in the
.pofile build.shcompiles your translations into binary.mofilesinstall.shautomatically bundles them into the widget when installing
cd translate/<package>/
cp template.pot <language_code>.poFor example, to start a Dutch translation for the clock:
cd translate/clock-digital/
cp template.pot nl.poLanguage codes follow the ISO 639-1 standard:
| Language | Code |
|---|---|
| Dutch | nl |
| French | fr |
| German | de |
| Spanish | es |
| Portuguese (Brazil) | pt_BR |
| Japanese | ja |
| Korean | ko |
| Chinese (Simplified) | zh_CN |
Open the .po file in a translation editor:
- Lokalize — KDE's translation tool (recommended)
- Poedit — Cross-platform PO editor
- Any text editor — PO files are plain text
Each entry looks like:
#: packages/date/contents/ui/config/ConfigGeneral.qml:16
msgid "Theme:"
msgstr ""Fill in msgstr with your translation:
#: packages/date/contents/ui/config/ConfigGeneral.qml:16
msgid "Theme:"
msgstr "Thema:"Also update the header at the top of the file:
- Set
Language:to your language code (e.g.,nl) - Set
Content-Typecharset toUTF-8 - Fill in
Last-Translatorwith your name
Commit your .po file and open a PR. That's it — the maintainer handles the rest.
| Package | Strings | Template |
|---|---|---|
battery |
23 | template.pot |
clock-analog |
13 | template.pot |
clock-digital |
19 | template.pot |
clock-digital-large |
24 | template.pot |
date |
6 | template.pot |
media |
6 | template.pot |
photo |
33 | template.pot |
weather |
19 | template.pot |
If you add or modify i18n() strings in QML files, regenerate the templates:
./translate/merge.shThis updates all template.pot files and merges changes into any existing .po files.
Translations are automatically compiled when you run install.sh. You can also build them manually:
./translate/build.shThis compiles all .po files into .mo binaries and places them in:
packages/<widget>/contents/locale/<lang>/LC_MESSAGES/plasma_applet_<id>.mo
The build scripts require gettext:
# Debian/Ubuntu
sudo apt install gettext
# Fedora
sudo dnf install gettext
# Arch
sudo pacman -S gettext