I'm using the i18n-js and the react-native-localize to support multiple languages in my React Native application. I create a JSON file for each language and display it with a key depending on the user's language settings. Here is the core file that imports JSON files and configures the i18n.
import I18n from 'i18n-js';
import * as RNLocalize from 'react-native-localize';
import en from './en.json';
import ja from './ja.json';
const locales = RNLocalize.getLocales();
if (Array.isArray(locales)) {
I18n.locale = locales[0].languageTag;
}
I18n.fallbacks = true;
I18n.translations = {
en,
ja
};
export default I18n;
Since some languages don't use alphabets, I want to be able to change its font size.
Does anyone know how I can make this work?