Bilingual APP flipping button

I would like to have just one button to be flipped from EN to FR and vise-versa leading to a global variable 0 (for EN) and 1 (FR) to be used throughout the APP. The block I used is not working. Tks.

Why do you need the global Language, if you have btnLanguage.Text to test?

Also, does pressing a button that says "English" mean you want the app to display English?

Also, where is that global Language used in the app and how?

P.S. Maybe a List Picker would be a more general solution?

Hey Sef,

To toggle between EN and FR with one button, try something like this:

blocks

CopyEdit

When btnLanguage.Click
do
  if global Language = 0
  then
    set global Language to 1
    set btnLanguage.Text to "EN"
  else
    set global Language to 0
    set btnLanguage.Text to "FR"

This flips the global variable and updates the button label.

As ABG mentioned, you could also use btnLanguage.Text directly to check the language, but if you're using global Language elsewhere, this setup works fine.