Technical Articles
How to make your application multilingual in SAP Build Apps
In this blog we will try to show you how you can make your application multilingual.
Introduction
In most scenarios you have to translate your application label and text according to client/customer requirement for better user experience and globalization. Here I will try to explain you with a simple example how you can translate your application label or text using translation variable. Before you can start with this blog I would recommend you too go through this link to get started with AppGyver.
for more info on SAP Build you can try this link https://answers.sap.com/tags/6cfd8176-04ae-4548-8f38-158456e1a47a
Requirement
Solution
SAP build has provided a very simple and straight forward solution that I will walk you through by this blog.
The first thing you need to do is add the supported language under translation variables refer Figure 1. For this blog, I have selected German and English. You need to provide a fallback language too or it will take the first value by default.
Figure 1: Set translation variables for English and German.
Then you must add a Text/Title in your application.
Figure 2: Adding Text/Title.
Then go to Properties for your text and click on the Translate button. You will see a pop up where an editable key for your translation is created. Now you must provide your translation for the given text. Click on Create Translate and Save your changes.
Figure 3: Setting up translation key for Text/Title.
Now we have created our translation for Hello World.
Next step would be to see a preview of our application. For that I have created a Selection Field where we will select the language and it will change translation for Hello World from English to German.
Figure 4: Application preview.
You can see how we can make your applications multilingual.
Conclusion
You can make your application multilingual using these simple steps. If you want to translate your text from your oData call it is also possible, you just need to assign those value as key and provide a right translation.
Hope this small blog would have helped you and do not forget to share your feedback and learning from this blog in the comment section.
you can also checkout my another blog on How to use filters in SAP AppGyver
For more information you can check these links too.
SAP Build Apps | SAP Community
SAP Builders – SAP Community Groups
Ask questions about SAP S/4HANA Cloud and follow
Read other SAP S/4HANA Cloud blog posts and follow
Please follow my profile for future posts
Hi Vikas,
Going by the title of this blog, if it is referring to SAP AppGyver "Classic" edition, then please be aware that this is being retired as of July 31st, 2023. I would suggest posting about SAP Build Apps instead to be more current.
Regards,
Mustafa.
Hi Mustafa,
Thanks for providing your valuable feedback. I am aware of this news on AppGyver classic but for this translation there are not much changes, as I am also working on build application. But point noted from you and will post from SAP Build apps on my upcoming blogs.
Thanks
Vikas
Can you show the logic and component binding for when you change the language?
Hi Daniel,
You can simply assign the current language. In my scenario I am doing it using if else condition and directly assigning i18n language, but it can come from any source and assigned as i18n language.
Hi Vikas,
I went back to using AppGyver today as I started at another company.
Needing to use language switching, I found this post.
But the "Translation Variables" option just doesn't appear for me.
I'm using the community version (free).
Is this the restriction?
If there is no restriction, was this item withdrawn?
How to translate the app, depending on the country you access?
Thanks.
Hi Jerry,
I created my account and checked for translation variables in SAP Community version and I can see translation variables.
To answer your questions:
Is this the restriction?
Not Yet
If there is no restriction, was this item withdrawn?
NO
How to translate the app, depending on the country you access?
You can use "GPS Location" in Logic canvas to get current location and from there you can get the current country and change your translation.
Translation Variables
Option not exist
Hi Jerry,
You can use sap build apps for creating your project,as per my knowledge sap is going to retire AppGyver classic. Try using this link for SAP BUILD Apps community login and create a project from scratch.
Thanks
Vikas Gupta
Thanks.
Hi Gupta,
What is the formula that you have included for the if condition flow function?
Hi Javier,
This is my if condition 'IF(outputs["Receive event"].eventValue =='EN', true, false)' and for output's I am setting direct language value in i18n.
Thanks
Vikas