in GUI Development by

I noticed that localization is not implemented for horizontal or vertical lists containing Views::Text items.

Cached items are not updated when current language is changed even though the class containing the horizontal or vertical list has Multilingual property set to true.

Why is it so? I thought that list's cache should be flushed when language is changed and all items should be re-inited by calling OnLoadItem slot - but this method is not called at all when language is changed.

1 Answer

0 votes

As far as I understand, you want to update the List after changing language, right?

You could just refresh the list, after you have changed the language.

For example:

if( language == Default)
  language = German;
  language = Default;

VerticalList.InvalidateItems( 0, VerticalList.NoOfItems );

This means, after you have changed the language, the list will be reloaded,which initializes the TextViews anew, which get also the new strings.



First of all the language is changed in another part of the program. This means that I need to implement ReInit constructor for every class that has vertical list in it and in this reconstructor invalidate the list.

Secondly, I'm trying to say that automatic localization facilities provided via Multilingual property of a class doesn't work.

Best regards,

Hello Maxim,

let me try to give you some information about the MultiLingual feature...

The attribute MultiLingual determines, how objects of the particular class should behave when the language is changed at the runtime. In the broadest sense, this attribute permits a GUI component to update itself automatically when language is changed without the necessity to implement this behavior explicitly.

If the language changes and the attribute is true, then all multi-lingual initialization expressions specified for members within the respective class are automatically re-evaluated. This is performed individually for every existing object of the class. In other words, all variables, properties and arrays defined within the class are updated to values corresponding to the new language.

By using the attribute MultiLingual you instruct Embedded Wizard to generate for every data member (property, variable or array), which is initialized with an expression involving localized constants or bitmap resources, code for the corresponding re-initialization operation.

For all assignments or initalizations that you have done within your code, Embedded Wizard cannot generate the necessary re-initialization code. In this case you have to implement your own ReInit constructor - but this should be not a big issue, just invalidate the list.

Best regards,


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