background
react+react-intl do internationalization
question
how can I get the current language file as quickly as possible by passing the title string to Native through jsbridge?
1. Initialize
as follows<IntlProvider
locale={chooseLocale()}
messages={chooseLocaleFile()}>
<App />
</IntlProvider>
2. Rendering DOM has no pressure
< FormattedMessage id="section_title" defaultMessage="name" / >
3. But what about passing strings directly through JS?
the following example, how can "Zhang San" be obtained from localeFile?
window.location.href = "JSBridge://alert/?message=" + "";
ask the Great God for an answer!