Multilingual app

In this short tutorial, you will learn how to easily create a multilingual app on the example of a complaint app.

 

1. Form

1.1

Create a spreadsheet named Data with two columns, in the first column type in the following cells: "First name:", "Last name:", "Date:", "Product:", "Description of the problem:" and "Comments: (Optional)". Set all cells in the second column to editable, and in the cell next to Date, set the type to date and enter the formula =TODAY() (the formula returns today's date).

mceclip20.png

1.2

Create a Workflow action button and go to the Workflow tab. Add 'Sent' state and the 'Send' action leading to it.

mceclip18.png

In the action's options, in the execution condition field, enter the formula: =if(isempty(Data.b1)||isempty(Data.b2)||isempty(Data.b3)||isempty(Data.b4)||isempty(Data.b5),false,true) and in the error message field, write 'Please complete all mandatory fields'. Thanks to this, user will not be able to perform the action if he does not fill out all the mandatory fields.

mceclip19.pngAnd in fact, that would be all if the app was only in English.

 

2. Support section

Add a spreadsheet named Support_Section with two columns. In cell A1 enter 'English:' and under it paste all field labels from the Data sheet as shown below. In the second column, in the first cell, enter 'Polski:' and complete this column with the translated names.

mceclip25.png

In the last cells, enter 'Language:' and 'Język:'. If you would like to add more languages, add more columns with translations. Set the visibility of the spreadsheet to false.

 

3. Change the language

3.1

Create a spreadsheet called Language with two cells. Make the second cell editable and change its type to drop-down list. In the items of the drop-down list, enter the formula: =array('Polski', 'English'). The user will be able to choose the language of the app from this list.

mceclip22.png

Additionally, in the cell enter the formula =if(CURRENTUSERCULTURE()='pl-PL','Polski','English'). The CURRENTUSERCULTURE formula returns the culture code (that is, the language) that the user is using on the platform. The formula if in this case replaces the culture code with the corresponding language name. Thanks to this, the default language of the app will be the language used by the user.

mceclip23.png

3.2

In the first cell, enter the formula =if(B1='English',SUPPORT_SECTION.A8,SUPPORT_SECTION.B8). The cell will say 'Language:' or 'Język:' depending on the selected language.

mceclip26.png

If the app had more than two languages ​​available, the formula would look like this: =if(B1='English',SUPPORT_SECTION.A8, B1='Polski',SUPPORT_SECTION.B8, B1='next language',SUPPORT_SECTION.C8 ...)

3.3

Similarly, enter the if formulas in the cells of the first column of the Data sheet, as shown below.

mceclip27.png

3.4

Go to the Workflow tab and add a second action named 'Wyślij'.

mceclip28.png

In the properties of this action, analogically to the 'Send' action, complete the fields with the execution condition and error message as below.

mceclip29.png

3.5

Set the visibility of the 'Send' action with the formula: =if(language.b1='English',true,false), and in the 'Wyślij' action - set with the formula: =if(language.b1='Polski',true,false). Thanks to this, the 'Send' action will be visible after selecting English, and the 'Wyślij' action - after selecting Polish.

mceclip31.pngmceclip30.png

Save and add yourself as a creator and run the app.

mceclip32.pngmceclip33.png

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk