Links

In-app language(Only supported on iOS)

We support app-level setting language on the iOS side since RN SDK V2.1.0.

Integration

JS/TS

import FireworkSDK from 'react-native-firework-sdk';
FireworkSDK.getInstance().changeAppLanguage('ar'); // format: ar or ar-JO
Generally, the changeAppLanguage API should be called in the following cases:
  1. 1.
    The App is launched(e.g. in the componentDidMount method of App component).
  2. 2.
    Users change the app language manually.
  3. 3.
    Other cases that change app language.
If there is a react-native restart code in your app. Please add the code before the react-native restart code. Such as:
await FireworkSDK.getInstance().changeAppLanguage(language);
RNRestart.Restart();

Change app language on iOS native side

import FireworkVideoUI
AppLanguageManager.shared.changeAppLanguage("ar") // such as ar, ar-JO, en, etc.
Generally, the changeAppLanguage API should be called in the following cases:
  1. 1.
    The App is launched(e.g. in the application(:, didFinishLaunchingWithOptions:) -> Bool method).
  2. 2.
    Users change the app language manually.
  3. 3.
    Other cases that change app language.
After calling changeAppLanguage API, we need to recreate FireworkVideo SDK components to update the UI. Such as:
  • Recreate video feed and story block
  • Stop floating player