Developer

Changing the Language of Our Mobile SDK: A Comprehensive Guide

#Tutorial

Arrow navigation

Go back

Changing the Language of Our Mobile SDK: A Comprehensive Guide

In this guide, we'll walk you through the process of changing the default language of our SDK for both Android and iOS platforms. By translating the SDK's strings, you can provide a seamless experience for users in their preferred language. Let's get started!

Android

Step 1: Locate the SDK Archive

- Search for the VisioMoveEssential.aar archive within your project directory.

- Rename VisioMoveEssential.aar to VisioMoveEssential.zip.

Step 2: Modify Language Resources

Inside the newly created VisioMoveEssential.zip, find three important files: values.xml, values-ar.xml and values-fr.xml.

- values.xml: Contains the default values displayed by the SDK.

- values-ar.xml: Contains values displayed when the device locale is set to arabic language. 

- values-fr.xml: Contains values displayed when the device locale is set to french language.

More about it here. 

Review the contents of the file you want to edit. Some strings may already be translated. Modify and complete them to match the instructions given in values.xml.

For example you want to change the “accessible” term into “person with reduced mobility”. Then find the string “Accessible”  in values.xml : 

And update it to : 

If you wish to add support for additional languages, refer to the documentation on adding other locale resources.

Step 3: Recreate the .aar File

- Navigate to the VisioMoveEssential folder in your project directory.

- Run the following commands to recreate the .aar file:

Step 4: Test the SDK

Now, when your application is launched on a device with Spanish (for example) as the selected locale, the SDK will display Spanish values where appropriate.

iOS

Step 1: Locate the Localization File

- Search for

(ar for arabic language, fr for french language, etc.). This file should be located within

‍ &

Step 2: Edit Localization Strings

- Open VisioMoveEssential.strings using a text editor like BBEdit.

- Review the contents of this file. It contains some of the strings used by the SDK. Complete any missing translations based on the en.lproj/VisioMoveEssential.strings file. Note that you can also update en language if some translations don’t suit you.

Step 3: Test the SDK

Once you've made the necessary translations, if the user's device is set to Spanish (for example), your app will automatically launch in Spanish.

Providing Translations

If you make edits to a language or add support for a new one, please consider sharing these translations with us. This will allow us to update our SDK in the next release, ensuring a better experience for all users otherwise, you will have to repeat the operations with each new release. Table to name resources in android 

By following these steps, you can seamlessly change the language of our SDK to accommodate a diverse user base. Providing a localized experience enhances user satisfaction and widens the reach of your app in global markets.

Happy coding!