langpack.getLanguage
Get information about a language in a localization pack
func (c *Client) LangpackGetLanguage(ctx context.Context, request *LangpackGetLanguageRequest) (*LangPackLanguage, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.LangpackGetLanguage(ctx, &tg.LangpackGetLanguageRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *LangPackLanguage
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
LangPack | string | yes | Platform identifier (i.e. android, tdesktop, etc). |
LangCode | string | yes | Either an ISO 639-1 language code or a language pack name obtained from a language pack link. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | LANG_CODE_NOT_SUPPORTED | The specified language code is not supported. |
| 400 | LANG_PACK_INVALID | The provided language pack is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
langpack.getLanguage#6a596502