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 SDKif you haven't already.

Going International

Localizing & Internationalizing your in-app Support.

Internationalization

Helpshift iOS SDK comes with support for 47 languages out of the box with English as the default. To enable the available languages, simply drag & drop the HsLocalization.bundle to your project. The Helpshift SDK will be localized based on the user’s device language. This can be set by going to General → Language & Region → iPhone Language. If the user’s device language is not available, English will be used as default.

If the end-user has a language already set for their device (via Settings->General->International->Language) the correct language translations will be used. If the said language is not available English will be used as default.

Important

Add only required languages from HSLocalization

If you are adding strings for a certain language, it enables that language in your app when submitted to the App store. This has app wide implications and may cause unwanted problems if not taken care of. Specifically, this can lead the App Store to detect that you support a particular language even though you have not specifically added that language to your application. Make sure to only add those languages that your app supports.

List of supported languages

LanguageLocale
Englishen
Germande
Spanishes
Frenchfr
Italianit
Russianru
Simplified-Chinesezh-Hans
Traditional-Chinesezh-Hant
Hong Kong-Chinesezh-HK
Hong Kong-Chinese (Traditional)zh-Hant-HK
Singapore-Chinesezh-SG
Singapore-Chinese (Traditional)zh-Hant-SG
Portuguesept
Koreanko
Japaneseja
Turkishtr
Dutchnl
Czechcs
Hungarianhu
Indonesianid
Thaith
Sloveniansl
Vietnamesevi
Arabicar
Polishpl
Norwegianno
Swedishsv
Finnishfi
Romanianro
Greekel
Danishda
Malayms
Hebrewiw
Slovaksk
Ukrainianuk
Catalanca
Croatianhr
Bengalibn
Bulgarianbg
Gujaratigu
Hindihi
Kannadakn
Latvianlv
Malayalamml
Marathimr
Punjabipa
Persianfa
Tamilta
Telugute

Adding your own translations

Steps to add your own language translation to Helpshift iOS SDK:

  1. Select your Project from XCode, you can see the Localizations section as shown below, click on the + symbol to add your Localization. Select the localization you want to add for e.g., Dutch.

    {" "}

    external image hs-doc-I18n1.png
  2. Once you have selected Dutch, XCode will prompt you to choose reference language to create Dutch localization, select HelpshiftLocalizable.strings and select English as reference language, uncheck all other resource files in your project to create Dutch localization for Helpshift iOS SDK. See below for reference.

    {" "}

    external image hs-doc-I18n2.png
  3. After you have pressed the Finish button, Xcode will create the file HSLocalization/nl.lproj/HelpshiftLocalizable.strings. Click "HelpshiftLocalizable.strings (Dutch)" from XCode to add Dutch Localization. See below for reference:

    {" "}

    external image hs-doc-I18n3.png

Localization setup

Note

For v3.2.0 and above

The Helpshift localized strings (.lproj folders) have now been moved from HSResources to HSLocalization folder in the Helpshift zip file.The HSLocalization folder needs to be added to your project for the languages you want to support. Just remove the respective .lproj folders from HSLocalization for languages you do not wish to support.

If you're using SDK v3.1.x or below, and you're upgrading to SDK v3.2.0, make sure to remove HSResources for v3.1.x from your project, add HSResources and HSLocalization separately (as mentioned above) from the SDK v3.2.0 folder.

For Cocoapods, localized strings are not added by default on pod install. You must add the languages of your choice manually from the HSLocalization folder. Drag and drop the corresponding .lproj folders into your project from the directory where Cocoapods saves the Helpshift SDK folder.

Set SDK language

Note

Applicable to SDK v1.7.0 and above.

You can set the SDK language for the given locale using the method setLanguage.

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 language for the given locale with only language code.

HelpshiftCocos2dx::setLanguage("fr");

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

HelpshiftCocos2dx::setLanguage("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.

Note

KNOWN ISSUE - In-built strings don't show up in the Helpshift iOS SDK

It happens if sometimes you did not enable localized strings for the HelpshiftLocalizable.strings file. The Helpshift SDK reads all its strings from that strings file. In Xcode on the left hand sidein "Project Navigator" select HelpshiftLocalizable.strings. On the right in "Show Utilities" select "Show the File Inspector". You will see a "Localize..." button. Click on that to enable localized strings for the .strings file.

localize.png