How do I translate in-app forms?

A webview form can also be used as an in-app form. This article will explain how you can show translated surveys for web-view forms. The below example is for the specific SDK Android case. The way data is sent along differs per SDK type, below you can also find the different ways to send along extra data per SDK type:

SDK iOS native: https://github.com/Mopinion-com/mopinion-sdk-ios-swiftpm#221-use-the-data-method

https://github.com/Mopinion-com/mopinion-sdk-ios-swiftpm#221-use-the-data-method

SDK iOS native Web: https://github.com/Mopinion-com/mopinion-sdk-ios-swiftpm#221-use-the-data-method

SDK Android native:

SDK Android Web:

Please note that it is not possible to translate native app forms. In this case, separate forms should be made.

Select a web form instead of an app form to make it possible to translate a form in your app.

When using SDKs, it is possible to send along extra data:

import com.mopinion.mopinionsdk.*; Mopinion M = new Mopinion(this, "12345abcde"); M.data("first name", "Andy");

The values sent along can also be used to determine the translation that should be used for the survey.

For example:

M.data("lang", "fr");

In the survey builder, you can add a translation for this language and trigger that translation based on a JS variable.

The lang key will be part of the metaData object so you have to check for the value of metaData.lang :