How to change your language settings for ASAP Flutter SDK?

How to change your language settings for ASAP Flutter SDK?

The ASAP SDK is designed to accommodate a diverse user base, supporting a total of 49 languages. This flexibility allows you to select the most suitable language based on the geographical location of your app's end-users, ensuring a tailored experience.

Here’s a list of the 49 language codes that you can utilize to configure the language settings for the ASAP help widget. By doing so, you can enhance user accessibility and improve customer support interactions.

Language

Local code

English (UK)

en-GB

English (US)

en

German

de

Spanish

es

Catalan

ca-ES

French

fr

French (Canada)

fr-CA

Italian

it

Russian

ru

Chinese (Traditional)

zh-Hant

Chinese (Simplified)

zh-Hans

Turkish

tr

Dutch

nl

Danish

da

Portuguese (Portugal)

pt-PT

Japanese

ja

Swedish

sv

Polish

pl

Arabic

ar

Hebrew

he

Afrikaans

af

Czech

cz

Bulgarian

bg

Finnish

fi

Greek

el

Hungarian

hu

Indonesian

id

Norwegian (Bokmal)

nb

Romanian

ro

Thai

th

Ukrainian

uk

Vietnamese

vi

Urdu

ur

Hindi

hi

Telugu

te

Kannada

kn

Tamil

ta

Marathi

mr

Korean

ko

Persian

fa

Bengali

bn

Gujarati

gu

Malay

ms

Malayalam

ml

Slovak

sk

Croatian

hr

Slovenian

sl

Kazakh

kk

Icelandic

is


Below is the code that helps you set the language for the ASAP help widget. Pass the language identifier to this method. For instance, pass "en" for English.
  1. ZohodeskPortalConfiguration.setLanguage(String language)

iOS

Notes
However, to limit the size of the SDK, the iOS version of the SDK is bundled with only 13 languages.
The table below lists the 13 languages that are bundled with the SDK:

Language

Local code

English

en

German

de

Spanish

es

French

fr

Italian

it

Russian

ru

Chinese (Traditional)   

zh-Hant

Chinese (Simplified)

zh-Hans

Turkish

tr

Dutch

nl

Danish

da

Portuguese (Portugal)  

pt-PT

Japanese

ja


To add any of the other 36 languages to your app, follow the following steps:

      1. Download the strings bundle.

      2. Remove the lproj files of the languages not required for your app.

      3. Finally, add the bundle to your project.

Android 

Suppose your app supports only a handful of languages rather than all 49, as mentioned in the above table. In that case, you can configure the ASAP help widget to support only the languages you want.

To do this, include the following code snippet in the 
build.gradle file:
  1. android {
  2.     defaultConfig {
  3.         ...
  4.         resConfigs "en", "ta", "fi"
  5.     }
  6. }
Notes
Please note that the snippet mentioned above includes only English, Tamil, and Finnish in the help widget, excluding the other languages.
InfoRefer here for more details: resConfigs key