# setLanguage

## Description

Allows users to set a default language for the app from the pre-defined languages in language settings.

## Input / Parameter

| Name | Description                                    | Input Type  | Default | Options | Required |
| ---- | ---------------------------------------------- | ----------- | ------- | ------- | -------- |
| lang | The name of the language to be set as default. | String/Text | -       | -       | Yes      |

## Output

N/A

Note: The component will be updated to show the translated text in the language specified by the user.

## Callback

N/A

## Video

Coming Soon.

## Example

The user override the default language (English) of their App.

### Step

1. Go to language setting tab add language "chinese", add label "Language" and assign chinese word for the label as below:

   ![](/files/lRUL7OPEJ0wa3UFy5vop)
2. Draw a Label with "Language" Caption, a button "setLanguage"

   ![](/files/4XmftNDFIJ1Puxg6ifhg)
3. Call the function

   ![](/files/ECu9Bv5v6LNzHMQdwmNz)
4. Reload

   ![](/files/l9Vbji6HmcpyKVG6pD2L)

### Result

The word "Language" will be changed to "语言选择".<br>

![](/files/SPwXNimDm9Af7ccSTKyA)

### Notes

* In the language setting, the word used for mapping is case sensitive.

## Links


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/app/setlanguage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
