#1 2016-11-25 14:22:36

starin
Banned
Registered: 2016-11-09
Posts: 12

Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hi,

How to set the App TextDirection from ltr to rtl with Codes ?

thanks .

Offline

#2 2016-11-25 14:44:57

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello starin,

I think that understand what the problem is. I update App Builder right now in order to fix a mistake that doesn't allow us to change the values of the [App.LanguageCode] and [App.TextDirection] in runtime. Now you can change such variables and therefore the appropiate changes are applied to the application.

So update your App Builder copy starin and, please, consider to buy one or more App Builder licenses!

Offline

#3 2016-12-18 11:44:57

yosik
Member
Registered: 2016-12-18
Posts: 6

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hi,
In the App options, I set the Text Direction to RTL. I have an element (button) on my view with a hebrew text but I did not see any change in the text.
Can you help?
Thanks

Yossi

Offline

#4 2016-12-18 11:48:16

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello yosik,

Yes; apparently the RTL changes doesn't affect to the Push butons (and other similar controls) because their text is centered in the control. If you place an Input control, for example, below the button, you can see how the RTL made the expected text direction changes. I am not sure if we can go ahead in the buttons case, since, as I say, their text appear centered in the control, no matter if the text direction is LTR (Left To Right) or RTL (Right to Left).

Offline

#5 2016-12-18 12:14:58

yosik
Member
Registered: 2016-12-18
Posts: 6

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hi,
Yes, I see that, thanks.
And I also see that this RTL or LTR setup is project wide, which means that if I have some elements I need to be RTL and others which I want LTR, I cannot have it both ways...
Is there a way to setup the bidi parameter? and/or add a per element rule (RTL or LTR)?
Thanks
Yossi

Last edited by yosik (2016-12-18 12:15:18)

Offline

#6 2016-12-18 12:41:08

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello yosik,

yosik wrote:

Hi,
Yes, I see that, thanks.
And I also see that this RTL or LTR setup is project wide, which means that if I have some elements I need to be RTL and others which I want LTR, I cannot have it both ways...
Is there a way to setup the bidi parameter? and/or add a per element rule (RTL or LTR)?
Thanks
Yossi

Honestly I am not experience in RTL languages. Right now the language direction is established using the appropiate "dir" attribute for the HTML tag of the applications. Maybe it's the common way, that is, normally we no need to mis RTL and LTR, but I can be wrong.

Anyway, when we talk about App Builder's controls, we talk about HTML controls, then, if a control accept the "dir" attribute, there is no problem to set it in the proper way. For example, the below code set the "dir" attribute for an "Input1" control:

SetAttribute "Input1" "dir" "RTL"

I don't know if this can help you in something but I hope so.

Offline

#7 2016-12-18 14:14:22

yosik
Member
Registered: 2016-12-18
Posts: 6

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

It did help, thanks.
So to understand, what does the Text Direction, under the App Option, do? If I can set the attribute I want per element, why is there a "global setting"?
Thanks
Yossi

Offline

#8 2016-12-18 14:15:57

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime

Hello Yossi,

yosik wrote:

It did help, thanks.
So to understand, what does the Text Direction, under the App Option, do? If I can set the attribute I want per element, why is there a "global setting"?
Thanks
Yossi

Because that option determine the "dir" attribute of the application's main HTML tag, which is the way to indicate the text direction for all the application's views & controls.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.