Quick Start - Android

Localize your Android app with Localazy.

Localazy offers two options how to integrate with Android apps. You can either use our powerful SDK or simply upload and download your XML resources with CLI.

SDK 🔗

Add plugin 🔗

Localize your app with Gradle plugin for Android

Use our Gradle plugin for Android for a seamless integration. If you need help with integrating the plugin, contact us. If you can’t use it, please tell us why you are unable to use our Gradle plugin.

Add Localazy Gradle plugin

Insert Localazy repository and Gradle plugin to the buildscript section of build.gradle file in your project’s root directory:

buildscript {

    repositories {
        // ... other repositories ...
        maven { url "https://maven.localazy.com/repository/release/" }
    }

    dependencies {
        // ... other dependencies ...
        classpath "com.localazy:gradle:1.5.3"
    }

}

Gradle build 🔗

2. Open gradle.build file in your app’s module and add following snippet a the end of the file:

// Always be sure to add this after android { ... } section
apply plugin: 'com.localazy.gradle'

localazy {
    readKey "the-read-key-for-the-project"
    writeKey "the-write-key-for-the-project"
}

Read more about injection options to configure what type of library is injected and whether OTA updates are available for all users or loyal ones only.

And that’s it! Your app is translated, and translations are updated automatically.

Configure the plugin 🔗

Our defaults are suitable for the majority of apps, and extra configuration is usually not necessary except for small tweaks (excluding particular strings, disabling errors for debug builds, etc.)

The configuration of the plugin looks like:

localazy {

    readKey "the-read-key-for-the-project"
    writeKey "the-write-key-for-the-project"

    upload {
        // ...
    }

    download {
        // ...
    }

    injection {
        // ...
    }

    resources {
        // ...
    }

}

CLI 🔗

XML 🔗

Upload resource files with strings to Localazy and manage your translations easily. Download translated files back.

1. Install Localazy CLI for your operating system.

2. Create a configuration file localazy.json in the app’s module. You can start with our sample:

{

  "writeKey": "your-write-key",
  "readKey": "your-read-key",
  
  "upload": {  
    "type": "android",
    "files": "src/main/res/values/strings.xml"
  },
  
  "download": {
    "files": "src/main/res/values-${langAndroidRes}/${file}"
  }
  
}

3. Upload the source strings with localazy upload whenever you change them.

4. Download translated files with localazy download before building your app.


See more Android samples for complex apps with existing translations, build types, product flavors, etc.

You can upload all your existing translations too! Learn more about it.


Localazy CLI is simple to start yet flexible enough for any project. Let’s take a quick tour.