Hi community,
I am very new to Embedded Wizard, and even so I have been able to implement a simple menu to change some parameters units (temperature, distance, etc.), language and time & date. In this case, I have two project members of type "Language" (Spanish and English/default) declared in the application and "Multilingual" property set to 'true'. However, my main problem here is that language change is not working.
I have taken Embedded Wizard own example project called "Menus" as reference to implement my menu. So, I have a class "DeviceClass" where there is a property called "Language" which is updated when one of the items of the language menu is selected by outlet properties. The onset method of the property is as follows:
// The property doesn't change -> nothing to do.
if ( pure Language == value )
return;
// Remember the new value in the internal memory of the property.
pure Language = value;
// The property doesn't change -> nothing to do.
if ( pure Language == value )
return;
// Remember the new value in the internal memory of the property.
pure Language = value;
// Immediatelly update the UI language
if ( value == 1 ) language = Spanish;
else language = Default;
$if $prototyper
trace "Change language to", language;
$endif
// Notify all associated property observers.
notifyobservers ^Language;
And I also included the next "UpdateLanguage()" method with expected argument 'aNewValue':
// Only if the reported value does differ from the one stored currently in the property.
if ( aNewValue != pure Language )
{
// Remember the new value in the internal memory of the property.
pure Language = aNewValue;
// Immediatelly update the UI language
if ( aNewValue == 1 ) language = Spanish;
else language = Default;
// Notify all associated property observers.
notifyobservers ^Language;
}
In the application, all "Text" components' caption contain string constants that include different values for each language. And the case is that property "Language" is being updated properly, but texts stay the same when a new language is selected. I have read all available documentation and doubts in the forum related to language change, but I still cannot figure out what I am doing wrong.
I may need here some help to solve this issue. What can I do?
Thank you in advance and regards,
Fayna