37 views
in GUI Development by
Hi,

I have displayed daa and time .if i am change the language how i change the lanugae of month.Multilungal is true only.

please guide me to resolve this.

var Core::Time currentTime = (new Core::Time).CurrentTime;
Text.String = currentTime.Format( "%d-%b-%Y");
trace "Text.String",Text.String;

1 Answer

0 votes
by

Hello Ramesh,

you will need localized version of the month names and as second challenge you will need to execute the above code, when language is switched.

Step 1: The month names are stored in constants. Per default the constants contain only the English version of the names. You will find the constants in the Browser window:

Step 2: Depending on whether you want the full or abbreviated month names to be displayed, create variants of the respective constants within one of your own (!) unit. For example, to create a variant of the constant January, I dragged the constant from the Browser window to the Composer window with the Application unit while pressing the keys CTRL, SHIFT and ALT (see also Create new constant variant):

Step 3: When you select the just created variant, you can edit its content for each language individually in the Inspector window. For example, the language Spanish if such exists in your project:

Step 4: Repeat the above steps for all other month constants.

Step 5: If you want the above code (the code form your question) to be executed when the language is changed, you have to place the code within the ReInit method. This method is automatically executed, when the language is changed. See also: React programmatically to language selection.

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

...