Treating a erroneous login REPLY in a 2nd language. When/How?

Hi everyone,

How does/will Wappler proceed to return an error message in another language following this steps ?

Does one need to integrate a condition based on the prefered language pre-selected by a logged user and …if so… is this Paramater evaluated just before Displaying the Error msg ?

Tks ! :hugs:

1 Like

i would go with browser lang

1 Like

yes, i woukd go with freddys suggestion. are you using chrome? my guess would be browser set to wrong language and chrome is translating it automatically. Translation is not somthing wappler can do at present

1 Like

I was thinking more about forcing the user at registration time to select one among a list of few languages…
then (after being logged) display the UI in his language (when available) as well as displaying any error mesage in this language…

So at any moment, there would need to be a variable about User´s language selected between pages… and some process able to evaluate this variable and display the error text in spanish rather than English when necessary…

Can´t Wappler offer a quick language checking just before choosing to display a msg in one or another lang. ?
All these msg text would have to be pre-translated and stored in a file or a database, I don´t expect Wappler itself to do some autotranslating (as googletranslates does)

any other clue ?
:no_mouth:

I‘m at the same point. Check that post here

I would prepare DB setup and all the keys. You need to keep in mind that maybe a translate key may have different meanings, even if its the same word. That because context can be different. I would use Google translate and then go manually trough all the translated keys. There are also hosted solutions for translation, which you just can connect to any project like:

https://weblate.org/en/

1 Like

uihh, thanks Freddy… I ve tried to read it - but thats a bit to smart for me.

wouldnt there be a way add to the securtiy script something like…
if userVarLang = Eng
Error msg = Wrong login ! Please try again…
if userVarLang = Spa
Error msg = Login equivocado ! Porfavor intentalo otra vez…

I m not yet acquainted with all the Wappler components, and that script would be easier for me to set up…:hugs:
:yum:

You can apply a condition to pretty much anything in Wappler.
you can either hide or show elements based on a condition and there is also a dmx-if

so you would have each language statement in a DIV for example snd use show/ hide according to language setting

2 Likes

Fine, that´s what i was looking for indeed.
(for the rest I can take care of the translation in itself)

tks :hugs: