Question
TouchGFX - can't switch language.
I defined a text in 3 languages in Texts in Designer.
When I set the language in the designer, my label is translated correctly.
Then I made 3 buttons and assigned "ChangeLanguage" action to each.
When I run the application and click the buttons - nothing happens.
Here's the function the TouchGFX generated:
void Screen1ViewBase::buttonCallbackHandler(const touchgfx::AbstractButton& src)
{
if (&src == &langGB)
{
//Interaction1
//When langGB clicked set language GB
//Change language to GB
Texts::setLanguage(GB);
invalidate();
//Interaction4
//When Interaction1 completed call virtual function
//Call redraw
redraw();
}
else if (&src == &langPL)
{
//Interaction2
//When langPL clicked set language PL
//Change language to PL
Texts::setLanguage(PL);
invalidate();
//Interaction5
//When Interaction2 completed call virtual function
//Call redraw
redraw();
}
else if (&src == &langZA)
{
//Interaction3
//When langZA clicked set language ZA
//Change language to ZA
Texts::setLanguage(ZA);
invalidate();
//Interaction6
//When Interaction3 completed call virtual function
//Call redraw
redraw();
}
}The functions are called, but well, nothing happens. The label is not translated.
