---
name: "getLangContent"
mode: "kit"
versionRequirements:
  - { name: "BizKit", version: "3.0.0" }
platform:
  - "iOS"
  - "Android"
async: true
---

## getLangContent

> [VERSION] BizKit >= 3.0.0

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Get translations

### Parameters

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `complete` | `() => void` | No | - | Callback invoked when the API call completes (runs on both success and failure) |
| `success` | `(params: Object) => void` ↓see below | No | - | Success callback |
| `fail` | `(params: Object) => void` ↓see below | No | - | Callback on API call failure |

#### success callback parameters

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `langContent` | `Record<string, any>` | `3.1.2` | Translations |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extensions |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Extended error code |
| `errorMsg` | `string` | Extended error info |


### Examples

```tsx
ty.getLangContent({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});
```
