Package Exports
- expo-native-translations
- expo-native-translations/build/withNativeLocalization.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (expo-native-translations) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-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
Expo installation
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-translationsAfter 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.