INNER CODE UNIT · TypeScript
setLanguage
OneSignal/react-native-onesignal · src/index.ts:449
export function setLanguage(language: string) {
if (!isNativeModuleLoaded(RNOneSignal)) return;
RNOneSignal.setLanguage(language);
}
/** Set an alias for the current user. If this alias label already exists on this user, it will be overwritten with the new alias id. */
export function addAlias(label: string, id: string) {
if (!isNativeModuleLoaded(RNOneSignal)) return;
RNOneSignal.addAlias(label, id);
}
/** Set aliases for the current user. If any alias already exists, it will be overwritten to the new values. */
export function addAliases(aliases: Record<string, string>) {
if (!isNativeModuleLoaded(RNOneSignal)) return;
RNOneSignal.addAliases(aliases);