Localization and Strings
Incode web products will display in the default language set in the browser, however, you can explicitly set up one of the supported translations.
Supported Languages
- English - en
- Spanish - es
- French - fr
- Hindi - hi
- Haitian creole - ht
- Indonesian - id
- Malay -ms
- Portuguese - pt
- Turkish - tr
- Vietnamese - vi
- Chinese - zh
Pro Tip
You can explicitly change the language of your application by appending a 2-digit language code in your app's URL. Example, lang=fr or lang=pt
Customization
In addition to localization support, you may want to change strings to display different words.
For example, to change a screen that shows the word "Retake" you can choose to show the word "Try again" instead. Here's how to do that.
{
"common": {
"retake": "Try again", //previously the word "Retake" was here
}
}
Example translations files
You can control the language on SDK screens by loading language files. Below are a few example language files. These files include our keys. To set your own string preferences, keep our keys the same and then edit the values to display what you prefer.
English: en.js
Spanish: es.js
Language files are set in the Web SDK's create()
method, like below:
import { en } from "./en.js";
const incode = await create({
apiURL: apiURL,
translations: en,
});
Updated 4 months ago