Skip to content

I18nConfig

I18nConfig = Record<Language, LocalizedI18nConfig> | LocalizedI18nConfig

Defined in: types/config.ts:130

Custom i18n configuration for the modal See i18next json format

Available variables

  • {{ productName }} : The name of your website (metadata.name)
  • {{ productOrigin }} : The origin url of your website
  • {{ estimatedReward }} : The estimated reward for the user (based on the specific targetInteraction you can specify, or the max referrer reward if no target interaction is specified)

Context of the translation see i18n context

  • For modal display, the key of the final action (sharing, reward, or undefined)
  • For embedded wallet display, the key of the logged in action (sharing or undefined)
// Multi language config
const multiI18n = {
fr: {
"sdk.modal.title": "Titre de modal",
"sdk.modal.description": "Description de modal, avec {{ estimatedReward }} de gains possible",
},
en: "https://example.com/en.json"
}
// Single language config
const singleI18n = {
"sdk.modal.title": "Modal title",
"sdk.modal.description": "Modal description, with {{ estimatedReward }} of gains possible",
}