Welcome to MonJoomla forum board.

Hebrew & RTL language support

Hebrew & RTL language support

Hello Bill,

First - I need to be able to see messages on the card in Hebrew (I changed the font in the XML to Arial which I know it have Heb support).
Right now I can see only small rectangles instead of letters (see attached image).
Second - after I gonna see Hebrew, it's have to be in RTL direction (I need to save on the LTR in case it's in English).
Can you help me to accomplish that?

Thanks & Sorry for my bad English
Shay

Zelbi
useravatar
Offline
6 Posts
User info in posts
Administrator has disabled public posting

Re: Hebrew & RTL language support

Hello Shay

For that you need to change the font (ttf file), now I'm using verdana, you need to found a TTF font with the Hebrew character in it.

Don't know if a regular Arial font have them, but if  you have them on your computer.

Just upload your font in the fonts directory, (it work only with TTF font.)

/components/com_kocustomgiftcard/assets/fonts/

And change the font name in the XML (card template)

/components/com_kocustomgiftcard/assets/params/default.xml

In this file you have full control over the text color, text size, text position and for your case Font.

For each text on the card you can modify the font, the best do a search and replace, you need to change the verdana.ttf at 11 places.

I have some Chinese customers and with the proper font the component work great.

For the RTL, this is mostly done by the Joomla template. When your Joomla template display in RTL, my component will do the same

Let me know

Thanks for your support

If you like my Joomla apps, please help support them with a review here:
http://extensions.joomla.org/

Thank you!

lebill
useravatar
Online
1732 Posts
User info in posts
Administrator has disabled public posting

Re: Hebrew & RTL language support

Hi Bill,

Thanks for your answer but ... I do succeeded to see the Hebrew letters but it is opposite for example (if it was in English) the word Mother appears rehtoM.
I decided for now to edit the language file and add the English Only:
COM_KOCUSTOMGIFTCARD_PERSONAL_MESSAGE="Personal Message (optional)<br />(English only)"

Shay

Zelbi
useravatar
Offline
6 Posts
User info in posts
Administrator has disabled public posting

Re: Hebrew & RTL language support

Hello Shay

I did some research, and I found a solution for your RTL issue with the message.

It's a little hack to do in the code

If you want I can do it for you, just need FTP access for 2 mins and a url to test the hack.

If you know some PHP you can do it easily too.

The hack is here  http://www.php.net/manual/en/function.i … .php#97767

And you need to add it to this file, at the end.

/components/com_kocustomgiftcard/models/checkout.php

Just use the new function on the message value at line 465 you have this

Code:

$message = strip_tags(urldecode($message));

Just add a new line under it with the function.

Code:

$message = revUni($message);

I didn't test it but normally hack from PHP.net always work great.

Let me know

Thanks for your support

If you like my Joomla apps, please help support them with a review here:
http://extensions.joomla.org/

Thank you!

lebill
useravatar
Online
1732 Posts
User info in posts
Administrator has disabled public posting

Re: Hebrew & RTL language support

Hi Bill,

"For the RTL, this is mostly done by the Joomla template. When your Joomla template display in RTL, my component will do the same "

I have every thing work in RTL (by the template) but the gift card constructor is still in LTR.
The text is correct and it take it from the he-IL folder that I added to the Language folder.

Any suggestions?
Thanks,
Shay

Zelbi
useravatar
Offline
6 Posts
User info in posts
Administrator has disabled public posting

Re: Hebrew & RTL language support

Hello Shay

Did you see my post just before yours, finally for the RTL with the GD it's doesn't work naturally, you need to do  a hack for it.

In the post you have a function a guy did (from the php.net forum), you can give it a try or if you want I can test it on your server (need FTP).

Let me know

Thanks for your support

If you like my Joomla apps, please help support them with a review here:
http://extensions.joomla.org/

Thank you!

lebill
useravatar
Online
1732 Posts
User info in posts
Administrator has disabled public posting

Re: Hebrew & RTL language support

Hello Bill,

There are two different problems I have with the Hebrew support:

* Yes I saw your post, that post was about the personal message, and I did try it with no success!
I changed the strip_tags to the revUni  -  $message = revUni($message); (it was on line 471 and not 465 as you wrote)
I copied the function and paste after the phpInfos() function on the same file.
I changed the font to one with Hebrew (ttf) and I do see Hebrew but still in a wrong direction.

** Regarding my last post, I wrote you cause I have a problem with the constructor form (the form where users insert the email, name amount etc.)
My web site have full RTL support but this form remains in LTR mode.
Your component "see" that the website in Hebrew mode and take the right strings in Hebrew (in correct direction)
I just need the layout to be correct.   

Hope it is clear enough for you to understand
Thanks.

Zelbi
useravatar
Offline
6 Posts
User info in posts
Administrator has disabled public posting

Re: Hebrew & RTL language support

Ahhh sorry about that, my English is still not perfect yikes)

ok for the issue in the form, this is weird, because I didn't hardcode this, it's should use the css from the template ??????

Open my CSS, the best now it's to hardcoded it

components/com_kocustomgiftcard/assets/css/ko_cgc.css

First class in it it's the html class, add the direction method in it like below...

Code:

html {

direction:rtl;
}

If this is  not working, I will need to see it and test it, the same for the other issue in the GD (on the image), if you can give me ftp access I will take a look.

Let me know

Thanks for your support

If you like my Joomla apps, please help support them with a review here:
http://extensions.joomla.org/

Thank you!

lebill
useravatar
Online
1732 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
834
Total Polls:
0
Total Posts:
167772690
Posts this week:
2
User Info:
 
Total Users:
4455
Newest User:
snickers
Members Online:
3
Guests Online:
451


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked