Translation of Telegram Desktop

Translation File Format

Translation file format is compatible with Apple .strings format. Each key has a string value, some characters should be escaped, like:

‘"’ (double quote) should be written like '\"'
'\‘ (backslash) should be written like ’\\'
‘{’ (open brace) should be written like '\{'
(newline) should be written like '\n'
‘#’ (number) should be written like '\#' inside counted tags (see below)

Tags

Not escaped open brace is used in two cases. First for replacement tags, like:

“{user} changed group title to {title}”

This tags {user} and {title} should not be translated and will be replaced in app, they should remain exactly as they were in the original phrase (but not necessary in the same places or in the same order). The translation of this phrase to Italian could look like:

“{user} ha cambiato il nome del gruppo in {title}”

Number dependent tags

Second for replaces with number dependency, like:

“Found {count:no messages|# message|# messages} in this conversation”

Here in place of {…} one of three variants will be chosen by app, depending on a numeric value: “no messages”, “# message” or “# messages” (one for value equal to 0, one for value equal to 1 and one for all other values), and the ‘#’ character will be replaced by the value itself. So the example above can produce three strings:

Found no messages in this conversation
Found 1 message in this conversation
Found 5 messages in this conversation

So the tag between { and : should remain exactly as it was in the original phrase, and three values, separated by ‘|’ character, should be translated. The translation of this phrase to Italian could look like:

“{count:Nessun messaggio trovato|Trovato # messaggio|Trovati # messaggi} in questa conversazione”

And it will produce three strings:

Nessun messaggio trovato in questa conversazione
Trovato 1 messaggio in questa conversazione
Trovati 5 messaggi in questa conversazione

Testing your translation

Starting from version 0.7.3 Telegram Desktop can use your translation file from Transifex as a source for it's phrases.

To use your .strings file you should save it to your hard drive and then go to Settings and click “Change Language” link while holding both “Shift” and “Alt” keys on your keyboard. Then instead of language list you will see a choose file dialog and you can choose your translation file.

Be carefull!

It is always better to change string somehow, than to let it exceed the available space. Be especially carefull with the this strings enlisted below, check them carefully in the smallest window size.

  1. Intro text on application launch
  2. Text in about box
  3. "Such phone is not signed up" error text
  4. Code input field placeholder
  5. "Wrong code" error text
  6. Check updates text + link in Settings
  7. Connection type box in Settings
  8. Username description text box in Settings
  9. Download path box in Settings