I’m pretty sure I know that answer but since I’m not 100% sure I’m asking. A pizza oven maker in Italy noticed my pizza dough, sauce and cheese calculator and asked if there was anyway to have it display Italian instead of english. I’m new at web design and still struggling with simple things like cookies and radio buttons so this would need to be as easy as turning on a light switch for me to implement it.
Wondering if their is some mechanism within Wappler (or reachable via API) that would automatically convert my page (if a button was pressed or possibly based on the users IP address origination location)?
I did see this “you can handle translations really well with app connect dynamic bindings and database with translations. So you can have a server connect action fetching the data for the current language and then just populate the dynamic texts on the page.” but that seems really hard and I doubt I could figure it out or set it up. Hoping with all the cool stuff on the web someone would have a simple solution…
Hi Norm,
The answer is YES, you can have multi-language site of course.
There are two ways of doing this.
Using a cookie. You set a cookie that stores the language. Then you have two variants of your texts on the page and you show the one corresponding on your cookie value, using the show/hide dynamic attributes:
<p dmx-show="cookie.language == 'en'">I like pizza</p>
and
<p dmx-show="cookie.language == 'it'">mi piace la pizza</p>
Create two versions of your page, and put them in two subfolders site.com/en/ and site.com/it/ - then redirect users with a link.
BTW that’s a nice topic for a tutorial i should make
Don’t relay on google translate its robotic and don’t make sense.
And havig double versions of everything is not practical at all.
How about you bind the text attribute of every element you want to translate with a value in the database.
This way you can add a new language anytime. And don’t have to change anything in the page after the first setup.