From c0ad63f72cec666f98c0c3f52dd0d31bef2a6448 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 27 Jun 2018 14:45:56 +0200 Subject: [PATCH] Update CustomizeSessions page --- docs/source/resources/CustomizeSessions.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/source/resources/CustomizeSessions.rst b/docs/source/resources/CustomizeSessions.rst index 4564eaf0..498003d4 100644 --- a/docs/source/resources/CustomizeSessions.rst +++ b/docs/source/resources/CustomizeSessions.rst @@ -4,8 +4,9 @@ Customize Sessions As you may probably know, Telegram allows Users (and Bots) having more than one session (authorizations) registered 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 -app or by invoking `GetAuthorizations <../functions/account/GetAuthorizations>`_ with Pyrogram. +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) and store some useful +information about the client who generated them. .. figure:: https://i.imgur.com/lzGPCdZ.png @@ -46,23 +47,20 @@ Or, pass the arguments directly in the Client's constructor. Set Custom Languages -------------------- -These are two extra parameters you can change: ``system_lang_code`` (OS language) and ``lang_code`` (Client language). -They exist to tell Telegram in which language it should speak to you (terms of service, service messages, ...) and are -usually both set to the same value, in `ISO 639-1 `_ standard. -Pyrogram uses "en" (English) for both by default. +To tell Telegram in which language should speak to you (terms of service, bots, service messages, ...) you can +set ``lang_code`` in `ISO 639-1 `_ standard (defaults to "en", +English). With the following code we make Telegram know we want it to speak in Italian (it): .. code-block:: ini [pyrogram] - system_lang_code = it lang_code = it .. code-block:: python app = Client( "my_account", - system_lang_code="it", lang_code="it", ) \ No newline at end of file