705 views
in GUI Development by
Hi,

   i am creaating small forms  and datafields are firstame,lastname

when i choose japanse-datafieds changed to japanase language

how to change dynamically, please guide me to resolve this

1 Answer

0 votes
by
Hi,

   I find this example code but how they ae creating global variable,how it is changed dyanamically.

i am not able to find the signal slot flow.wher they are pass the othr language strings.

please guide me to resolve this.
by

Hello Guru Ramesh,

in fact the chapter Working with Embedded Wizard: Managing localization is a good starting point to learn the language management. This chapter also contain examples demonstrating the functionality.

I find this example code but how they ae creating global variable,how it is changed dyanamically. i am not able to find the signal slot flow.wher they are pass the othr language strings.

Please see the above chapter once more as well as the included examples. In the simplest case you only need 4 steps to make a multilingual application:

Step 1: For each language you plan to support add a new Language member to your project. It identifies the language.

Step 2: Store all multi-lingual strings as constants. In Embedded Wizard each constant can contain multiple values, one value for each Language member existing in your project.

Step 3: Use the constants to initialize properties. For example you can use a constant in the initialization of the String property of a Text view.

Step 4: Set the attribute MultiLingual of the superior GUI component (of the class) containing the Text view to the value true.

Now the Text view will automatically change the displayed content when the language is switched at the runtime. How to switch the language? You set the global variable language. The alternation of this variable automatically updates all GUI components configured with the attribute MultiLingual = true and causes property initializations depending on multi-lingual constants to be re-evaluated.

The automatic language selection works in this simple scenario without needing to write a single line of code. If this is not sufficient for you, you can implement in the GUI component the so-called ReInit method and perform there operations when the language is changed. See also the above mentioned chapter Managing Localizations for more details.

I hope it helps you further.

Best regards

Paul Banach

 

 

 

by

Hi

how to set MultiLingual  .it s property ?

i checked in Text class and language class it is not there .

 

by

It as an attribute of the class, you want to make multi-lingual. For example, if you have created a GUI component acting as a form for user's first and last name, it is the class of this form. When you select the class, you see its attributes in Inspector. The following screenshot demonstrates it:

by
Hi,

i m facing type conversion challenges:

issue 1:Can not cast from type 'WidgetSet::PushButton' to type 'language' in the assignment.
The both types are not compatible. No automatic conversion possible.

issue 2:

 Bad operands combination in expression with the operator '=='.
The given operator was used with illegal operands of type 'language' and 'Application::Button'.

 

these 2 types of issues i am facing now
by
Hello GuruRamesh,

based on the provided informations I'm not able to help you. I don't know what you have done and why the error is reported. Please provide more details and the corresponding code section reporting the error.

Best regards

Paul Banach
by

Hi,

 i have added doc.please checkit.

i am adding language and called sot fuunction

multillingual also enabled.please check it.

 https://ask.embedded-wizard.de/?qa=blob&qa_blobid=12958682095560537188

by

Thank you for the further details. In your implementation you have a local variable tmp of type language and Button is an object of PushButton class. Both are not compatible. The error message is clear.

The question, what do you want to achieve with the implementation?

by

If you want to change the language to Italian when the user activated the button, implement the method with following code:

language = Italian;

 

by
Hi

 i have modified code:

sender; /* the method is called from the sender object */
    //trace "sender",sender;
    var language tmp= language;

    if (sender== Button )
    {
      //txtId =Italian;
      //trace "caption",txtId.String;
      language =Italian;
      trace "Language",language;
    }

 

error:Can not cast from type 'WidgetSet::PushButton' to type 'language' in the assignment.
 The both types are not compatible. No automatic conversion possible.

 

please guide me to resolve this
by
Hello GuruRamesh,

From what you have provided in your question I can't help you. There is no relation between the error message and the code fragment.

Try following:

1. When the error message appears, double click on the error message.

2. Embedded Wizard guides you thereupon to the corresponding location.

3. Verify your implementation at this location. Note the text in the error message providing helpful hints for the error cause.

Best regards

Paul Banach
by
Hi,

i am following same steps as mentioned in the documentation .but i am getting error

i checked the code .i am just add button and add one line code only as mentioned prvious comments

for me it is not working.need to change any property ?
by
Hello GuruRamesh,

at which step do you get the error? Concerning the error message, without the corresponding code or other details I'm not able to deduce the error cause. Please show me the code or upload a small project demonstrating your actual implementation.

Best regards

Paul Banach
by

One idea: is it possible that your component does contain a Push Button named Italian? And your project also contains a language member named Italian? Then the line language = Italian; would report the error because Italian identifies the button. In such case rename the button so its name does not conflict with the name of the language Italian.

Best regards

Paul Banach 

by

Hi,

i have attached code for  create small button and try to change language please find it.

 

https://ask.embedded-wizard.de/?qa=blob&qa_blobid=15640427331117941854

by
Hi Paul Banach,

    Now i have chnaged button name .now it is working fine.

 

With regards

Ramesh.G
by
That sounds good! ​​

Best regards

Paul Banach

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

...