From f10e30a8706137ae4dfedbf6c69fd3b1144df6b0 Mon Sep 17 00:00:00 2001 From: B0pol Date: Sat, 4 Apr 2020 09:40:29 +0000 Subject: [PATCH] Created "how to add a new language to NewPipe" --- How-to-add-a-new-language-to-NewPipe.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 How-to-add-a-new-language-to-NewPipe.md diff --git a/How-to-add-a-new-language-to-NewPipe.md b/How-to-add-a-new-language-to-NewPipe.md new file mode 100644 index 0000000..9e0fa07 --- /dev/null +++ b/How-to-add-a-new-language-to-NewPipe.md @@ -0,0 +1,13 @@ +## Add it on Weblate and translate it +NewPipe is translated with [Weblate](https://hosted.weblate.org/projects/newpipe/strings/). +1. Login to Weblate (you can use your GitHub account). +2. Add a new language with [tool -> start new translation](https://hosted.weblate.org/new-lang/newpipe/strings/). +3. Translate NewPipe. + +## 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). +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#L963). 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#L1028). 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. +3. Open a pull request on GitHub. + +If you have problems with this part, don't hesitate to contact us. \ No newline at end of file