1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-22 10:15:16 +01:00

Updated How to add a new language to NewPipe (markdown)

Tobias Groza 2021-01-10 15:01:53 +01:00
parent b3b2c8f46b
commit ffc8b02b9c

@ -7,7 +7,7 @@ NewPipe is translated with [Weblate](https://hosted.weblate.org/projects/newpipe
## Add it to the language selector ## Add it to the language selector
The language selector is available via `Settings -> Content -> App language`. It allows to change NewPipe's language *without changing the system's language* (it's the default Android behaviour). The language selector is available via `Settings -> Content -> App language`. It allows to change NewPipe's language *without changing the system's language* (it's the default Android behaviour).
1. Add the [language code](https://en.wikipedia.org/wiki/Language_code) [in the language code array in this file](https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/res/values/settings_keys.xml#L966). You must respect the alphabetic order. You can find the language code with Weblate: click on a language to translate, and the language code is in the last part of the URL. For example, English is `https://hosted.weblate.org/projects/newpipe/strings/en`, and English language code is `en`. 1. Add the [language code](https://en.wikipedia.org/wiki/Language_code) [in the language code array in this file](https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/res/values/settings_keys.xml#L966). You must respect the alphabetic order. You can find the language code with Weblate: click on a language to translate, and the language code is in the last part of the URL. For example, English is `https://hosted.weblate.org/projects/newpipe/strings/en`, and English language code is `en`.
2. Add the language name [in the language name array in this file](https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/res/values/settings_keys.xml#L1032). It must be placed at the same index as language code. For instance,`en` is the 13th on the language code array, hence it's the 13th on the language name array. 2. Add the language name [in the language name array in this file](https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/res/values/settings_keys.xml#L1009). It must be placed at the same index as language code. For instance,`en` is the 18th on the language code array, hence it's the 18th on the language name array.
3. Open a pull request on GitHub. 3. Open a pull request on GitHub.
If you have problems with this part, don't hesitate to contact us. If you have problems with this part, don't hesitate to contact us.