Firework Android SDK provides support for the host app to dynamically change languages at runtime. There is no specific API requirement for the host app to use this feature. The host app has the freedom to implement its own mechanism for overriding the context, and the Firework Android SDK will automatically update the PlayerActivity's BaseContext to the desired locale, enabling the update of resources and layout alignment (LTR/RTL) as per the current locale.
Below is an example showcasing how the host app can implement language changes within the app. Please note that this example can be customized based on your app's design and requirements.
Example
In the following example, the host app utilizes the attachBaseContext override method to update locale configurations. Additionally, an object called LanguageHelper is introduced to facilitate the update of resources' locale and persist the selected language. When users select a language from the options menu, the Activity is restarted to apply the locale updates and reflect the chosen language.