Android SDK

Crowdin SDK allows delivering new translations from Crowdin Enterprise project to your application immediately. Using this integration there will be no need to every time update application via Google Play Store to get the new localization version.

The integration provides:

  • Over-The-Air Content Delivery – the localized files can be sent to the application from the project whenever needed.
  • Real-Time Preview – all the translations that are done in the Editor can be shown in your version of the application in real-time. View the translations already made and the ones you’re currently typing in.
  • Screenshots – all screenshots made in the application may be automatically sent to your Crowdin Enterprise project with tagged source strings.

Requirements

Requirements to integrate Android application with project in Crowdin Enterprise:

Development Tool

  • Android SDK version 16+

App Programming Language

  • Java version 8+
    or
  • Kotlin version 1.3+

Distributions and Releases

Distribution is a CDN vault that mirrors the translated content of your project and is required for integration with Android app.

To manage distributions open the needed project and go to Integrations & API > Over-The-Air Content Delivery. You can create as many distributions as you need and choose different files for each. You’ll need to click the Release button next to the necessary distribution every time you want to send new translations to the app. Over-the-Air Content Delivery

Configuration

To configure Android SDK integration you need to:

  1. Set up Distribution in Crowdin Enterprise
  2. Set up SDK and enable Over-The-Air Content Delivery feature using Android Studio

Distribution Setup

Follow these steps to configure distribution:

  1. Open your project and go to Resources > Integrations & API.
  2. Find Android integration and click Connect. Android Integration
  3. Define distribution. You can:
    • add new distribution using Create Distribution button. Choose only the files translations for which you want to be shown in your application and click Create Create Distribution
      or
    • select existing distribution (if any). Pay attention to Last release time and, if needed, release distribution using Over-The-Air Content Delivery tab. Existing Distribution
  4. Copy distribution hash so you can use it for integration.
Note! Currently Custom Languages, Dialects, and Language Mapping are not supported for Android integration.

Crowdin SDK Setup

To integrate SDK with your application you need to follow step by step instructions localed in our GitHub repository.

Advanced Features

Real-time Preview

This feature allows translators to see translations in the application in real-time. It can also be used by managers and QA team to preview translations before release.

Screenshots

Enable this feature if you want all the screenshots made in the application to be automatically sent to your Crowdin Enterprise project with tagged strings. This way, translators will have an additional context for the source strings.

Parameters

Required for all features
your_distribution_hashUnique hash which you can get by going to Integrations & API > Over-The-Air Content Delivery. To see the distribution hash right-click on the needed distribution, choose Edit and copy distribution hash
Required for advanced features
source_languageSource language in your Crowdin Enterprise project (e.g. "en")
client_id;
client_secret
Crowdin Enterprise authorization credentials. Open the project and go to Integrations & API > Android, choose the feature you need and click Get Credentials
Optional
network_typeNetwork type to be used. You may select NetworkType.ALL, NetworkType.CELLULAR, or NetworkType.WIFI
interval_in_milisecUpdate intervals in milliseconds

File Export Patterns

You can set file export patterns and check existing ones using File Settings. The following placeholders are supported for Android integration:

Name Description
%language% Language name (e.g. Ukrainian)
%two_letters_code% Language code ISO 639-1 (e.g. uk)
%three_letters_code% Language code ISO 639-2/T (e.g. ukr)
%locale% Locale (e.g. uk-UA)
%locale_with_underscore% Locale (e.g. uk_UA)
%android_code% Android Locale identifier used to name "values-" directories

Limitations

Currently, there are the following integration limitations:

  • Plurals are supported starting from Android SDK version 24
  • TabItem text added via XML won’t be updated. As a workaround you can store tabItem titles in your string-array and add tabs dynamically
  • PreferenceScreen defined via XML is not supported
  • Activity titles defined via AndroidManifest won’t be translated. You can update toolbar manually inside the activity or fragment

Security

Crowdin Android SDK CDN feature is built with security in mind, which means minimal access possible from the end-user is required. When you decide to use Crowdin Android SDK, please make sure you’ve made the following information accessible to your end-users.

  • We use the advantages of Amazon Web Services (AWS) for our computing infrastructure. AWS has ISO 27001 certification and has completed multiple SSAE 16 audits. All the translations are stored at AWS servers.
  • When you use Crowdin Android SDK CDN – translations are uploaded to Amazon CloudFront to be delivered to the app and speed up the download. Keep in mind that your users download translations without any additional authentication.
  • We use encryption to keep your data private while in transit.
  • We do not store any Personally Identifiable Information (PII) about the end-user, but you can decide to develop the opt-out option inside your application to make sure your users have full control.
  • The Automatic Screenshots and Real-Time Preview features are supposed to be used by the development team and translators team. Those features should not be compiled to the production version of your app. Therefore, should not affect end-users privacy in any way.

Was this article helpful?