27 views
in GUI Development by

Good Day to All.

In my gui i have different languages set up and until so far it was working correctly.

the languages seem to work correctly except for some lists in my design.

here how it works.

SetupTopBar below contains Time/Date Password etc.

Now the broken part.


my AlarmHistoryList Screen (above picture) is being updated every 1 second using a timer and a slot called updateAllArrays. Vertical List 4 is the one with Alarm names

My device is sending me the data, into Application::Storage.EW_Alarm_Array then i am checking it with my own name database EW_History_Name_Array then i am pasting it into another array which is used to present it on my Vertical List 4 inside onLoadItem.

After every updateAllArrays trigger the list is already being forced to refresh so that we can update number of items to see if a new item is added to list etc color operation etc.

My storage EW_History_Name_Array is filled with items like Library::Pump1+" "+Library::MainPowerOff , Library::Pump1+" "+Library::ControlPowerFail they are set up as constantType strings.

When the Language is changed my History list is not changing language is it because the list is being already refreshed multiple times and invalideItems operation onLanguageUpdate is ignored because it is already refreshed.

Strangely when i start the application using turkish option the list history screen VerticalList4  is loaded with correct language



So this might be a conflict between updating the list every 1 second to check for data storage updates and trying to update the list on Language change as well.

 

 

1 Answer

+1 vote
by
 
Best answer

Hello,

My storage EW_History_Name_Array is filled with items like Library::Pump1+" "+Library::MainPowerOff , Library::Pump1+" "+Library::ControlPowerFail they are set up as constantType strings.

If I understand it correctly, the arrays are filled with language dependent strings. If yes, I suppose the strings within the arrays are not updated to the new language. You can verify this by setting a breakpoint in the method onLanguageUpdate. When the execution pauses use the debugger windows to inspect the array contents. If this is the problem, you have to reload the arrays with new contents when the language changes. Depending on your implementation you have two possibilities to do this:

Option 1: If the initialization expressions for the arrays are specified in Inspector window, see the section React automatically to language selection. In this case it should be sufficient to set the attribute MultiLingual of the class containing the arrays to the value true.

Option 2: If the arrays are initialized in code implemented within some method, you have to explicitly repeat the initialization each time the language changes. For this purpose you override and implement in the class containing the arrays the ReInit method. See the section React programmatically to language selection for more details.

I hope it helps you further

Best regards

Paul Banach

by

Yes my issue was option 1.
i remember updating my components true but i did not update my Storage to multi. now i did i think it works.

I will continue with more testing and see if i can brake it.

 

You sir are a LEGEND

i lost count of how many times you fixed my issues.

Best Regards.

Cihan

PS. I think i forgot to thank Mr. Manfred Schweyer on one of my other questions. If you see him please pass my regards to him as well.

You guys are the best.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...