Skip to content

Localization

Supported Languages

Document Reader SDK supports the following languages:

  • Arabic (ar)
  • Bangla (bn)
  • Czech (cs)
  • Danish (da)
  • German (de)
  • Greek (el)
  • English (en)
  • Spanish (es)
  • Finnish (fi)
  • French (fr)
  • Hebrew (he)
  • Hindi (hi)
  • Croatian (hr)
  • Hungarian (hu)
  • Indonesian (id)
  • Italian (it)
  • Japanese (ja)
  • Korean (ko)
  • Malay (ms)
  • Norwegian (nb)
  • Dutch (nl)
  • Polish (pl)
  • Portuguese (pt)
  • Romanian (ro)
  • Russian (ru)
  • Slovak (sk)
  • Swedish (sv)
  • Thai (th)
  • Turkish (tr)
  • Ukrainian (uk)
  • Vietnamese (vi)
  • Chinese Simplified (zh-Hans)
  • Chinese Traditional (zh-Hant)

Customizing Localization

The Regula SDK supports localization. If any language is required by your application but is not supported by the SDK, or you want to change our localized strings, you can add localized strings to resource files and allow the SDK to be presented to users in their system locale.

The list of available strings can be found here.

Android

To do this, add the needed strings to the strings.xml file.

iOS

To get started, include the string resource file named RegulaSDK.strings to your project's Resources folder. This filename is required and customization will only work if it is set as specified. Also, notice that this file has to be located in the corresponding .lproj folder, for example, es.lproj.

Warning

Don't forget to include RegulaSDK.strings as a Resource File.

Now you can redefine every string in the SDK with the appropriate translated values. This way, when a user has their device's System Language set to a language supported by your application, the SDK will utilize the appropriate string resources.

Example

You can implement it by using the config.xml:

Add strings desired to localize:

<platform name="android">
    <config-file parent="/*" target="res/values/strings.xml">
        <string name="strLookingDocument">Hello, world</string>
    </config-file> 
</platform>

Create the RegulaSDK.strings file in the www folder, and add strings desired to localize:

<platform name="ios">
    <resource-file src="www/RegulaSDK.strings" target="RegulaSDK.strings" />
</platform>

Content of the RegulaSDK.strings file:

"strLookingDocument" = "Hello, world";

Warning

Avoid changing the iOS system language (by using the AppleLanguages pref key) from within your application. This goes against the basic iOS user model for switching languages in the Settings app and uses a preference key that is not documented. At some point in the future, the key name may change and that would break your application.