Update CustomizeSessions page

This commit is contained in:
Dan 2018-06-27 14:45:56 +02:00
parent 7ed9cd6759
commit c0ad63f72c

View File

@ -4,8 +4,9 @@ Customize Sessions
As you may probably know, Telegram allows Users (and Bots) having more than one session (authorizations) registered As you may probably know, Telegram allows Users (and Bots) having more than one session (authorizations) registered
in the system at the same time. in the system at the same time.
Briefly explaining, sessions are simply new logins in your account and can be reviewed in the settings of an official Briefly explaining, sessions are simply new logins in your account. They can be reviewed in the settings of an official
app or by invoking `GetAuthorizations <../functions/account/GetAuthorizations>`_ with Pyrogram. app (or by invoking `GetAuthorizations <../functions/account/GetAuthorizations>`_ with Pyrogram) and store some useful
information about the client who generated them.
.. figure:: https://i.imgur.com/lzGPCdZ.png .. figure:: https://i.imgur.com/lzGPCdZ.png
@ -46,23 +47,20 @@ Or, pass the arguments directly in the Client's constructor.
Set Custom Languages Set Custom Languages
-------------------- --------------------
These are two extra parameters you can change: ``system_lang_code`` (OS language) and ``lang_code`` (Client language). To tell Telegram in which language should speak to you (terms of service, bots, service messages, ...) you can
They exist to tell Telegram in which language it should speak to you (terms of service, service messages, ...) and are set ``lang_code`` in `ISO 639-1 <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`_ standard (defaults to "en",
usually both set to the same value, in `ISO 639-1 <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`_ standard. English).
Pyrogram uses "en" (English) for both by default.
With the following code we make Telegram know we want it to speak in Italian (it): With the following code we make Telegram know we want it to speak in Italian (it):
.. code-block:: ini .. code-block:: ini
[pyrogram] [pyrogram]
system_lang_code = it
lang_code = it lang_code = it
.. code-block:: python .. code-block:: python
app = Client( app = Client(
"my_account", "my_account",
system_lang_code="it",
lang_code="it", lang_code="it",
) )