Dear All,
- first Name : ابو هريرة
Last Name : المزمل
- first Name : Abuhuraira
Last Name : المزمل
i want to concatenate first name with Last name in this format i.e (FirstName/LastName)
when i use this code : FullName = FirstName + ‘/’ + LastName;
the result came as
1 ) أبو هريرة / مزمل
2 ) Abuhuraira المزمل
1st result is wrong.
I need as below
1 ) مزمل / أبو هريرة
2 ) Abuhuraira المزمل
either one is arabic, the result is fine.
if both are arabic means, it will come (LastName / FirstName). i.e reversed
I need both result will be in this format i.e (FirstName/LastName)
Can anyone help?
Thanks in advance.
I know little about these RTL languages, nevertheless I have at least a hint for you.
Compare these two cases:
Yours:
str firstName = 'ابو هريرة';
Result: ابو هريرة/المزمل
With one extra English character
str firstName = 'ابو هريرةx';
Result: ابو هريرةx/المزمل
It seems that each of these strings have different direction (RTL/LTR), not only in AX but also here when I’m editing HTML. Please look at rules defining which direction is used for a string (I don’t know them).
Thanks.
is there any option to find the Language of the String…? (i.e ARABIC or ENGLISH)
Tnks Martin. I have fixed this issue by below coding…
TextBuffer txtFName= new TextBuffer();
TextBuffer txtLName= new TextBuffer();
;
txtFName.setText(FirstName);
txtFName.regularExpressions(true);
txtLName.setText(LastName);
txtLName.regularExpressions(true);
// Regular expression to validate only Arabic Letters
if (txtFName.find(’^[ا-ي]+$’) && txtLName.find(’^[ا-ي]+$’))
{
SegBG =LastName + ’ / ’ + FirstName;
}
else
{
SegBG = FirstName + ’ / ’ + LastName;
}