Skip to main content

Going International

Important
Helpshift’s Legacy SDKs (SDK Version <=7.x.x) reached their end of life on 31 Dec 2022, and end of support on 31 March 2023. Please upgrade to the Latest SDK if you haven't already.

Going International

The Helpshift Android SDK supports 47 languages out of the box with English as default. The translation strings used by the SDK can be found in the strings.xml file, under the following folders -

ValuesLanguageLocale
valuesEnglishen
values-deGermande
values-esSpanishes
values-frFrenchfr
values-itItalianit
values-ruRussianru
values-zh-rCNSimplified-Chinesezh_CN
value-zh-rTWTraditional-Chinesezh_TW
values-zh-rSGSimplified-Chinesezh_SG
value-zh-rHKTraditional-Chinesezh_HK
values-pt-rBRPortuguesept_BR
values-koKoreanko
values-jaJapaneseja
values-trTurkishtr
values-nlDutchnl
values-csCzechcs
values-huHungarianhu
values-inIndonesianin
values-thThaith
values-slSloveniansl
values-viVietnamesevi
values-arArabicar
values-plPolishpl
values-noNorwegianno
values-svSwedishsv
values-fiFinnishfi
values-roRomanianro
values-elGreekel
values-daDanishda
values-msMalayms
values-iwHebrewiw
values-skSlovaksk
values-ukUkrainianuk
values-caCatalanca
values-hrCroatianhr
values-bnBengalibn
values-bgBulgarianbg
values-guGujaratigu
values-hiHindihi
values-knKannadakn
values-lvLatvianlv
values-mlMalayalamml
values-mrMarathimr
values-paPunjabipa
values-faPersianfa
values-taTamilta
values-teTelugute

If the end-user has a language already set for their device, the correct language translations will be used. If the said language is not available, English will be used by default.

To add your own language, you need to provide the translated strings inside strings.xml under the appropriate folder. For example, in order to support the Japanese language, you need to place strings.xml with the translated strings under values-ja folder.

For more information, refer to Android's Language Support Guide

Selection of Languages

If your application does not support all the above mentioned languages and you want to strip off the Helpshift resources to reduce APK size, use the resConfigs gradle flag in your app's build.gradle as follows:


android {
defaultConfig {
...
resConfigs "en", "fr"
...
}
}

For example, the above code snippet will only retain resources of English & French languages in your app. For more details, refer Android's guide here

Set SDK language

Note

Applicable to SDK v3.9.0 and above

You can set the SDK language for the given locale using the method setSDKLanguage

Locale can contain two-letter lowercase ISO language codes (such as "en") as defined by ISO 639-1 and in addition contain two-letter uppercase ISO country codes (such as "US")as defined by ISO 3166-1. Language code and country code are separated by an underscore ("_"). Example - "pt_BR", "zh_CN".

For example :

Setting SDK language for the given locale with only language code.

Core.setSDKLanguage("fr");

Setting the SDK language for the given locale with both language code and country code.

Core.setSDKLanguage("zh_CN");

Before you set the language, make sure that there exists translations for the Helpshift strings in that locale. List of supported locale is mentioned above. If there is a locale which we currently do not support out of the box, please add the relevant translation files in your app.

Now, head over to String Customization for the list of strings that you can customize as per your needs.