Managing user locales
To manage a user locale, you can add an optional locale header parameter.
This parameter can be passed via any API endpoint that generates an email or SMS as a header parameter called Custom-Locale.
The parameter is automatically added to any requests called from the Core or UI SDK so long as the SDK is instantiated with the parameter value.
| See User locale in the Identity API reference documentation. |
Add parameter to SDK
import { createClient } from '@reachfive/identity-core';
const DOMAIN = 'Here paste your ReachFive domain';
const CLIENT_ID = 'Here paste your ReachFive client ID';
const client = createClient({
// Required parameters
domain: DOMAIN,
clientId: CLIENT_ID,
// Optional parameter
language: 'Here paste a language code',
locale: 'fr-FR' (1)
});
| 1 | Optional parameter where fr-FR is the locale and the value is automatically added in the Custom-Locale header parameter for request from the Core or UI SDK. |
import { createClient } from '@reachfive/identity-ui';
const DOMAIN = 'Here paste your ReachFive domain';
const CLIENT_ID = 'Here paste your ReachFive client ID';
const client = createClient({
// Required parameters
domain: DOMAIN,
clientId: CLIENT_ID,
// Optional parameter
language: 'Here paste a language code',
locale: 'fr-FR' (1)
});
| 1 | Optional parameter where fr-FR is the locale and the value is automatically added in the Custom-Locale header parameter for request from the Core or UI SDK. |