Android SDK

Crowdin SDK allows delivering new translations from the Crowdin 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 via Editor can be shown in the application in real-time
  • Screenshots – all screenshots made in the application may be automatically sent to your Crowdin project with tagged source strings

Requirements

Requirements to integrate Android application with the project in Crowdin:

Development Tool

  • Android SDK version 14+

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.

Distribution Setup

Follow these steps to configure distribution:

  1. Open your project and go to Project Settings > Content Delivery.

    Over-the-Air Content Delivery Also, you can press Get Credentials button to check the details required for the OAuth application while connecting Crowdin SDK. Over-the-Air Content Delivery

  2. Add new distribution using Add Distribution button. Choose only the files, translations for which you want to be shown in your application and click Next. Over-the-Air Content Delivery

  3. Copy distribution hash so you can use it for integration. Over-the-Air Content Delivery

  4. Сreate 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

Note! Currently Custom Languages, Dialects, and Language Mapping are not supported for Android integration.

Parameters

Required for all features
your_distribution_hashUnique hash which you can get by going to Project Settings > Content Delivery. To see the distribution hash, click three-dot button on the needed distribution, choose Edit and copy distribution hash
Required for advanced features
source_languageSource language in your Crowdin project (e.g. "en")
client_id;
client_secret
Crowdin authorization credentials. Open the project and go to Project Settings > Content Delivery, 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

Crowdin SDK Installation, Setup, and Advanced Features

For more details on how to set up Crowdin SDK for your application visit our GitHub repository.

Was this article helpful?