MadelineProtoDocs/old_docs/API_docs_v109/constructors/langPackLanguage.md
2020-03-06 12:24:14 +01:00

2.4 KiB

title description image
langPackLanguage Identifies a localization pack https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: langPackLanguage

Back to constructors index

Identifies a localization pack

Attributes:

Name Type Required Description
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?
name string Yes Language name
native_name string Yes Language name in the language itself
lang_code string Yes Language code (pack identifier)
base_lang_code string 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
plural_code string Yes 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 Yes Total number of non-deleted strings from the language pack
translated_count int Yes Total number of translated strings from the language pack
translations_url string Yes Link to language translation interface; empty for custom local language packs

Type: LangPackLanguage

Example:

$langPackLanguage = ['_' => 'langPackLanguage', 'official' => Bool, 'rtl' => Bool, 'beta' => Bool, 'name' => 'string', 'native_name' => 'string', 'lang_code' => 'string', 'base_lang_code' => 'string', 'plural_code' => 'string', 'strings_count' => int, 'translated_count' => int, 'translations_url' => 'string'];

Or, if you're into Lua:

langPackLanguage={_='langPackLanguage', official=Bool, rtl=Bool, beta=Bool, name='string', native_name='string', lang_code='string', base_lang_code='string', plural_code='string', strings_count=int, translated_count=int, translations_url='string'}