0. Check out useful Telegram Translations style guide before you start.
**1.** If your language is already on the translations platform, it's good idea to join the translation process there, instead of creating a whole new localization file by yourself. Unless there's some specific reason to, of course.
2. File name must end with ".xml" or mime type set to "application/xml".
It is displayed on language settings screen, so it may be useful to include e.g. a username, where to find newer version of the localization file.
2. Files larger than 1MB are not accepted by the app. If this is an issue for your language, report to the testing group.
3. When translating plurals, refer to Unicode table's cardinal row. Find your language by code on the left, then check what strings are needed for your translation. Unused variants must be removed.
4. When translating formatted strings, refer to Translations Platform to see what's inside the arguments.
IMPORTANT STRINGS
5.
language_code: used for determining pluralization rules and many other things.See this list to find `language_code` for your language.
When installing a custom localization file,
language_code is also used as an identifier, so localization files with the same language_code won't be duplicated in the list of installed languages in the app.You can put your unique identifier (e.g. Telegam username) in language_code by using following format:
${language_code}X${your_identifier}
${language_code} still must be a valid language code${your_identifier} must match [A-z0-9_] patternExamples
ru — just language code is OK (and usually better).enXOldEnglish, ruXOldEastSlavic — this can be useful for maintaining exotic translations, since they should not be replaced by regular translations.ruXtgx_android — if you just don't want any other translation with language_code=ru to overwrite your localization file, when user installs some other Russian localization file. This can be useful if your localization has some unique style (e.g. informal).6.
language_dateFormatLocale: locale to be used for date & time strings. If Android does not support your language, and you want date strings to be translated as well, submit report to the testing group.Example: en-UK
7.
language_name: name of the language. Displayed on Language settings screen.Example: Русский
8.
language_nameInEnglish: name of the language in English. Displayed in settings too.Example: Russian
9.
language_rtl: determines if UI has to be in the right-to-left direction. When sharing or installing RTL localization files, be aware that RTL support is not yet complete and there are many known issues.Values: 0 (ltr) or 1 (rtl)
10.
language_disable_lowercase: determines if UI has to not lowercase any string under any circumstances, i.e. because of strict grammar rules.Values: 0 or 1
11. HOW SOME OTHER STRING IS USED?
Kindly refer to the translations platform. There are dozens of descriptions and screenshots available. Use the following URL format to find specific string: https://translations.telegram.org/en/android_x/unsorted/${string_key}.
12. WHERE TO FIND LOCALIZATION FILES?
I don't know.
13. I MADE A LOCALIZATION FILE BUT APP DOES NOT ACCEPT IT
Check out application logs in the debug menu. If this happens due to some bug, submit report to the testing group.
14. I MADE A LOCALIZATION FILE BUT CANNOT FIND MISSING STRINGS
Tap on a localization file until you see Apply Localization pop-up. Then check out application logs, it will contain the list of all strings localization is missing.
15. I MADE RTL TRANSLATION BUT APP LOOKS AWFUL
Please wait until RTL will be properly supported by the app.