Skip to main content
← Design & Bravo Tags
Design & Bravo Tags October 11, 2023 · 3 replies

How to translate the web-view component?

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

Hi All,

I have successfully created a Bravo app and translated all the static text by following the tutorial provided at https://docs.bravostudio.app/integrations/multilingual-apps. However, I am currently facing a minor setback as I am unable to locate the option to translate the link of the web-view tag. I would greatly appreciate it if anyone has encountered a similar issue or if I am simply overlooking something.

Thank you in advance.

Greetings,
Gabriel

3 replies

Marielle Ibias Bravo team October 11, 2023

Hi ,

Is the web link yours and can you manage it? In this case, using the variable ${user.lang} in the URL and For example: [component:web-view:https://web.app/${device.lang}] you can manage the language from the website.

On the other hand, its not possible to change the language from Bravo as its an external link. However, you could maybe use Conditional Actions with two different web-view components (using different urls in each with each language option.)

Hope it helps! Let us know if you have any questions. 😊

PGMarketing October 11, 2023

Hi ,

Thank you for your help. So if understand well. For the url https://www.apple.com/benl/ I simply write [component:web-view:https://www.apple.com/${user.lang}\] and it will work? What is the value returned by ${user.lang} and is it some kind of dynamic variable that I can control/translate?

However, you could maybe use Conditional Actions with two different web-view components (using different urls in each with each language option.)

From my understanding I look for "user.lang is fr" and if the condition is true I forward it with "Go to page**"** to the correct web-view component? This is not clear to me, do you have some example of this? As a reminder I don't have a database linked to this project as it's not needed.

Greetings,
Gabriel

Marielle Ibias Bravo team October 11, 2023

Hi Gabriel,

Apologies, the correct variable is ${device.lang}.

It's a built-in variable that allow to send the language code of the device language. However, it would work only if you control the website. The website should have the language parameter added _"?lang=en".
 
F_or example: https://domain.com?lang=es, the ${device.lang} would replace the "es" for the same language that the user is using in his/her device.

We need a remote action triggering an API call to use Conditional Actions, so you can only use it if you have a backend.

Hope this explanation helps 🙂

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord