LangPackLanguage

class pyrogram.raw.types.LangPackLanguage

Identifies a localization pack

Constructor of LangPackLanguage.

Details:
  • Layer: 223

  • ID: EECA5CE3

Parameters:
  • name (str) – Language name

  • native_name (str) – Language name in the language itself

  • lang_code (str) – Language code (pack identifier)

  • plural_code (str) – A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info

  • strings_count (int 32-bit) – Total number of non-deleted strings from the language pack

  • translated_count (int 32-bit) – Total number of translated strings from the language pack

  • translations_url (str) – Link to language translation interface; empty for custom local language packs

  • official (bool, optional) – Whether the language pack is official

  • rtl (bool, optional) – Is this a localization pack for an RTL language

  • beta (bool, optional) – Is this a beta localization pack?

  • base_lang_code (str, optional) – Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs

Functions:

This object can be returned by 2 functions.

langpack.GetLanguages

Get information about all languages in a localization pack

langpack.GetLanguage

Get information about a language in a localization pack

TL Schema

langPackLanguage#eeca5ce3
flags:#
official:flags.0?true
rtl:flags.2?true
beta:flags.3?true
name:string
native_name:string
lang_code:string
base_lang_code:flags.1?string
plural_code:string
strings_count:int
translated_count:int
translations_url:string

= LangPackLanguage

Parameter Tree

LangPackLanguage
├── officialtrue (optional)
├── rtltrue (optional)
├── betatrue (optional)
├── namestring
├── native_namestring
├── lang_codestring
├── base_lang_codestring (optional)
├── plural_codestring
├── strings_countint
├── translated_countint
└── translations_urlstring

Example

LangPackLanguage(
    name="text",
    native_name="text",
    lang_code="text",
    plural_code="text",
    strings_count=0,
    translated_count=0,
    translations_url="text",
)