Translations
The 21 languages of HF Panel, how people choose one, how translations are stored in the source, and how to send a better translation.
The panels, HF Mail and the emails HF Panel sends are available in 21 languages: English and 20 translations. Each person picks their own language; nobody has to use the server's default.
The languages
| Code | Language | Code | Language |
|---|---|---|---|
en |
English | ru |
Русский |
es |
Español | uk |
Українська |
pt |
Português | ar |
العربية |
fr |
Français | fa |
فارسی |
de |
Deutsch | ur |
اردو |
it |
Italiano | hi |
हिन्दी |
nl |
Nederlands | bn |
বাংলা |
pl |
Polski | id |
Bahasa Indonesia |
tr |
Türkçe | vi |
Tiếng Việt |
zh |
简体中文 | ja |
日本語 |
ko |
한국어 |
Arabic, Persian and Urdu are shown right to left.
Choosing a language
- Everyone can switch language from the globe menu. The choice is remembered for their login.
- Visitors who haven't chosen get their browser's language, or else the server's default.
- Administrators set the default under Server Admin › System › Settings › Panel language.
How translations are kept
English is the source language. The other languages live in the HF Panel source as plain text files, one per language:
| Part | Translations | English texts |
|---|---|---|
| The panels | backend/panel/lang/src/<code>.txt |
backend/panel/lang/_keys.json |
| The emails HF Panel sends | backend/panel/lang/mail/src/<code>.txt |
backend/panel/lang/mail/_keys.json |
| HF Mail (webmail) | backend/mail/lang/src/<code>.txt |
backend/mail/lang/_keys.json |
Each line of a translation file is <number>|<translation>. The number is the position of the English text in
_keys.json, counting from 0:
24|Neues Konto
26|Benutzername
- A missing line, or a line with nothing after
|, shows the English text. - Keep placeholders such as
{1}exactly as they are; they are filled in with names and numbers. - Keep HTML out of translations: special characters are escaped when the files are built.
build.py in each folder turns the text files into the <code>.json files the software reads:
cd backend/panel/lang && python3 build.py de nl
Glossaries
For many languages, backend/panel/lang/glossary-<code>.md sets the register (for example formal "u" in Dutch) and
the words used for key terms such as account, domain, mailbox, backup and package. Follow it so that the same thing is
called the same everywhere.
Send a better translation
- Find the line in
src/<code>.txt(search for the current translation), or the English text in_keys.jsonand its position. - Change the translation, keeping the number and placeholders.
- Send the changed lines through
https://hostfog.io/contact/, with the screen where the text appears.
Corrections from people who use HF Panel in their own language every day are the most valuable ones we get.