expo-native-translations
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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-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.

Package Sidebar

Install

npm i expo-native-translations

Weekly Downloads

7

Version

1.0.1

License

none

Unpacked Size

22.2 kB

Total Files

21

Last publish

Collaborators

  • abumalick