1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Initial commit

Bill Zimmerman 2018-05-28 17:15:50 +02:00
parent 15d5fa1068
commit 9d2af67d68

69
Translations.md Normal file

@ -0,0 +1,69 @@
### RaspAP in your language
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](https://github.com/billz/raspap-webgui/issues/121) it became obvious that translations are something that the community both wanted and were willing to contribute to.
On Linux systems, [GNU's Gettext](https://www.gnu.org/software/gettext/) provides a standardized way of managing multi-lingual messages. In order to use Gettext, 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 Raspian, 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. **Important**: be sure to select UTF-8 as 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.
### Supported languages
The following translations are currently maintained by the project:
* français
* italiano
* Português (in progress)
* svenska (in progress)
A short list of desired translations include:
* 中文手册
* 한국어
* 日本語
* 繁體中文
* Русский
* Türkçe
* Indonesian
* Español
* Deutsche
* 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).
### Contributing a translation
The process is very straightforward. Start by downloading [this Portable Object file](https://raw.githubusercontent.com/billz/raspap-webgui/master/locale/en_US/LC_MESSAGES/messages.po) 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](https://github.com/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.