# Internationalization Configuration

## Usage

To manage the code and value of each multilingual option, log in to the [Tuya MiniApp Developer Platform](https://iot.tuya.com/miniapp/), select the target miniapp, and then go to **Multilingual**.

<Image
  src='/images/extended/extended-i18n.en-US.png'
  style={{
    borderRadius: '10px',
    width: '618px',
    boxShadow: '0 0 5px rgba(0,0,0,0.3)',
  }}
/>

## Multilingual applications

With the `I18n.t` function, multilingual fields can be applied to the global configuration, template file, and logic script. The methods are as follows:

### Global configuration

```json
{
  "window": {
    "navigationBarTitleText": "@I18n.t('tab1')"
  }
}
```

### Template file

```html
<view>Multilingual template parsing: {{I18n.t('tab1')}}</view>
```

### Logical script

```js
console.log(I18n.t('tab1'));
```

## Multi-Language Placeholders

In multi-language key-value pairs, placeholders can be used in the form of `{key}`. If a corresponding key exists in the multi-language data, it will be replaced; otherwise, the original content is retained. This is applicable in scenarios involving unit changes, quantity changes, etc.

For example, consider the following multi-language data definition:

```json
{
  "zh": {
    "fruit": "苹果",
    "apples": "我有 {count} 个{fruit}"
  },
  "en": {
    "fruit": "apple",
    "apples": "I have {count} {fruit}"
  }
}
```

- In the Chinese environment, calling `I18n.t('apples')` returns `我有 {count} 个苹果`.
- In the English environment, calling `I18n.t('apples')` returns `I have {count} apple`.

## Multilingual Panel

Internationalization is essential for developing panel miniapps. The multilingual module of a panel miniapp allows for requesting the specific multilingual settings for a product. 

- When creating and importing a project, you need to select the product to debug, so during the development process, the developer tool will automatically integrate product multilingualism.
- Product multilingualism takes precedence over mini-program multilingualism. For specific logic, refer to [product multilingual](https://developer.tuya.com/en/docs/iot/product-language?id=K93ixsjagr67p).