-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Adding string resources
Arthur Milchior edited this page Apr 23, 2023
·
1 revision
Here is a documentation on adding string resources , which will get translated either by crowdin or by pontoon.
-
Inside /res/values you'll see a number of folders.
-
Add the string to the first file in those folders.
-
To choose correct directory you can refer here: https://github.com/ankidroid/Anki-Android/wiki/Translating-AnkiDroid#logic-of-the-separation-in-different-files
-
The basic format is demonstrated here : https://github.com/ankidroid/Anki-Android/wiki/Code-style#string-key-resources-must-be-all-lowercase-using-underscore-to-separate-words
- For example, if you're adding to core, use the following file in the screenshot. path:src/main/res/values
-
-
You can then reference it as getString(R.string.id) in the Activity class you want.
-
It has an automated process to generate the other files.