-
-
Notifications
You must be signed in to change notification settings - Fork 794
Translations
Owing to its utility and low cost, the Raspberry Pi's reach extends to all corners of the globe. As our way of honoring this, we've made an effort to support internationalization (often abbreviated i18n) with RaspAP. Given the response from this issue it became obvious that translations are something that the community both wanted and were willing to contribute to.
On Linux systems, GNU's Gettext provides a standardized way of managing multi-lingual messages. In order for Gettext to work with different languages, you must configure a language package on your RPi corresponding to one of our supported translations.
To list languages currently installed on your system, use locale -a
at the shell prompt. On a fresh install of Raspbian, this should return a list like the one below:
$ locale -a
C
C.UTF-8
en_GB.utf8
POSIX
To generate new locales, run sudo dpkg-reconfigure locales
and select any other desired locales. Here is a useful list of ISO 639 language codes. Important: be sure to select UTF-8 as this is the preferred encoding.
For example, on an RPi with many locales installed, locale -a
would output something like this:
$ locale -a
C # fall-back, ASCII encoding, same as POSIX
de_DE.utf8 # German language, Germany, UTF-8 encoding
fr_FR.utf8 # French language, France, UTF-8 encoding
it_IT.utf8 # Italian language, Italy, UTF-8 encoding
ja_JP.utf8 # Japanese language, Japan, UTF-8 encoding
en_GB.utf8 # English language, GB, UTF-8 encoding
en_US.utf8 # English language, USA, UTF-8 encoding
pt_BR.utf8 # Portuguese language, Brazil, UTF-8 encoding
POSIX # fall-back, ASCII encoding, same as C
Once you've configured a locale on your system, RaspAP will read the HTTP_ACCEPT_LANGUAGE
string and use this to load your desired language in the UI.
The following translations are currently maintained by the project:
- Deutsche
- Français
- Italiano
- Português
- Svenska
A short list of desired translations include:
- 中文手册
- 한국어
- 日本語
- 繁體中文
- Русский
- Türkçe
- Indonesian
- Español
- Tiếng Việt
We are certainly not limited to the above. If you are willing and able to translate RaspAP in your language, you will be credited as the original translator (see below).
The process is very straightforward. Start by downloading this Portable Object file and replace the msgstr
messages with your translations. For example, an original English msgid
and the French msgstr
translation is below:
msgid "Dashboard"
msgstr "Tableau de bord"
Please be sure to include accent characters, if applicable. Email the translated .po files back to @billz (email address is in the .po file). We will compile them into Machine Object (.mo) files and add them to the project. Contributors will be credited as the original translators.
Many thanks.