DEPRECATED: You can use expo native capabilities for iOS and the plugin @mmomtchev/expo-android-localized-app-name for android to achieve native translations.
Expo Config Plugin to configure native translations when the native code is generated (expo prebuild
).
Adding this plugin lets you address two limitations of expo based apps:
- Use special scripting languages for your app name (Arabic, etc.)
- Use native translations for your app name
Tested against Expo SDK 45
This package cannot be used in the "Expo Go" app because it requires custom native code.
- First install the package with yarn, npm, or
expo install
.
expo install expo-native-translations
After installing this npm package, add the config plugin to the plugins
array of your app.json
or app.config.js
:
{
"expo": {
"plugins": [
[
"expo-native-translations",
{
"translations": [
{ "locale": "ar", "appName": "تجرب" },
{ "locale": "en", "appName": "Plugin app" }
]
}
]
]
}
}
The first element is the default language. You need to have at least one element in your translations array.
Next, rebuild your app as described in the "Adding custom native code" guide.