Telegram X Localizations
1.82K subscribers
2 photos
5 files
5 links
Tips and FAQ on how to create custom localization file for Telegram X @tgx_android.

Read more: t.me/tgx_android_translate/9
Download Telegram
Tips and FAQ on creating localization files for @tgx_android.

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_] pattern

Examples

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.
There are two ways of creating a new localization without using any app except Telegram X:

1. Tap help icon in Settings - Language, then Create button.

2. Hold built-in English language, tap Create Localization.

Note that when trying to use Share as XML application may show you Invalid localization file message until you translate the Main section properly.

This section is usually auto-filled, when locale was properly set upon new file creation.
When translation is not needed, use Paste Original through three-dot menu.

Tap format arguments on the bottom to quickly insert them in the input field.
Telegram X Localizations
Tips and FAQ on creating localization files for @tgx_android. 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…
As many requested, file name requirement will be removed starting 981 version (comes later today after some other fixes will be done).

So you would be able to give any file name as you wish.

UPD: update has been uploaded to Google Play.
Starting version 982, full file name (without extension) will be displayed on the intstalled languages list.

This applies only to localization files installed on 982 or later versions.
Couple complete localization files made by amazingly quck translators on the translations platform.

Note: though 100% translated, these localizations are not guaranteed to be perfect, as they are not yet officially released.

If you find mistakes, please leave a comment on the platform.