# langpack.getStrings

Get strings from a language pack

## Example

{% tabs %}
{% tab title="Javascript" %}

```javascript
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.langpack.getStrings({
        langPack: 'random string here',
        langCode: 'random string here',
        keys: ['random string here'],
        }));
    console.log(result); // prints the result
})();
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
import {Api, TelegramClient} from 'telegram';
import {StringSession} from 'telegram/sessions';

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result: Api.Vector<LangPackString> = await client.invoke(new Api.langpack.getStrings({
        langPack: 'random string here',
        langCode: 'random string here',
        keys: ['random string here'],
        }));
    console.log(result); // prints the result
})();
```

{% endtab %}
{% endtabs %}

## TL schema

```
---functions---
langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>;
```

## Parameters

|      Name      | Type                                                                                                    | Description        |
| :------------: | ------------------------------------------------------------------------------------------------------- | ------------------ |
| **lang\_pack** | [string](https://core.telegram.org/type/string)                                                         | Language pack name |
| **lang\_code** | [string](https://core.telegram.org/type/string)                                                         | Language code      |
|    **keys**    | [Vector](https://core.telegram.org/type/Vector%20t) < [string](https://core.telegram.org/type/string) > | Strings to get     |

## Result

[Vector](https://core.telegram.org/type/Vector%20t)[\[LangPackString\](https://core.telegram.org/type/LangPackString)](https://app.gitbook.com/s/-MMkAn4QUh4dOGfc-vjY/working-with-localization-packs/\[LangPackString]\(https://core.telegram.org/type/LangPackString\))

## Possible errors

| Code | Type                | Description                           |
| :--: | ------------------- | ------------------------------------- |
|  400 | LANG\_PACK\_INVALID | The provided language pack is invalid |

## Can bots use this methd ?

### yes

## Related pages
