How to develop an Arabic website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
robinspaul
Forum Newbie
Posts: 8
Joined: Wed Oct 08, 2008 10:06 am

How to develop an Arabic website

Post by robinspaul »

I have a website in English developed using php and mysql. My client wants me to do it in Arabic as well.
Could you please help me?
danielrs1
Forum Commoner
Posts: 29
Joined: Wed Jun 24, 2009 5:30 pm

Re: How to develop an Arabic website

Post by danielrs1 »

Look at the function: htmlentities(), ti should help you print the chars.

Also, an arabic translator would help :wink:
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: How to develop an Arabic website

Post by Mark Baker »

Ensure that you're using UTF-8 for everything, and remember that arabic is rtl rather than ltr
BornForCode
Forum Contributor
Posts: 147
Joined: Mon Feb 11, 2008 1:56 am

Re: How to develop an Arabic website

Post by BornForCode »

Two vague, what is your problem? Implementing a multilanguage system to your site or to save arabic letters?
robinspaul
Forum Newbie
Posts: 8
Joined: Wed Oct 08, 2008 10:06 am

Re: How to develop an Arabic website

Post by robinspaul »

The problem is I developed a website in English and my client wants the site in Arabic as well. He has given me the content translated to Arabic. When I paste it in the html page, it does not appear. I don't know how to put the Arabic content in html pages.
BornForCode
Forum Contributor
Posts: 147
Joined: Mon Feb 11, 2008 1:56 am

Re: How to develop an Arabic website

Post by BornForCode »

Send the proper headers so that browsers should know what charset to use for displaying content.
robinspaul
Forum Newbie
Posts: 8
Joined: Wed Oct 08, 2008 10:06 am

Re: How to develop an Arabic website

Post by robinspaul »

Could you please show me an example?
BornForCode
Forum Contributor
Posts: 147
Joined: Mon Feb 11, 2008 1:56 am

Re: How to develop an Arabic website

Post by BornForCode »

robinspaul
Forum Newbie
Posts: 8
Joined: Wed Oct 08, 2008 10:06 am

Re: How to develop an Arabic website

Post by robinspaul »

Could you please show me an example of html page.
I tried and I could not see anything (just some junk characters).
Should I install arabic font in the hosting server?
Thanks,
Paul
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Re: How to develop an Arabic website

Post by Skara »

Language tags:
viewtopic.php?f=1&t=103018

Fonts are read from clients, not hosts.
<span style="font-family: Arial;">blah</span>
will only use the Arial font if Arial is installed on the computer that's browsing the page.

Anyone who's reading an arabic website would more than likely have some arabic font installed on their computer. ;)
robinspaul
Forum Newbie
Posts: 8
Joined: Wed Oct 08, 2008 10:06 am

Re: How to develop an Arabic website

Post by robinspaul »

Hi,
I downloaded Arabic font from
http://www.freelang.net/fonts/index.php
and I used the above code
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<html lang="ar"> <!-- HTML -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar"> <!-- XHTML -->
Then I copied some arabic content to this page, after converting to arabic using google translater; but, I can't see the arabic
content.
Is there any specific font I need to download.
Thanks,
Paul
Post Reply