How can i regularise my right to left language where it is Arabic language. So it must start from right to left including all scroll bar, input box, upload whole layout is actually required to be shown as right to left.
This is my layout:
<?= $this->doctype();// xhtml = strict ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo $this->headTitle(); ?>
<?php echo $this->headMeta(); ?>
<?php echo $this->headScript(); ?>
<?php echo $this->headLink()->prependStylesheet('/css/production.css'); ?>
<link rel="shortcut icon" href="/img/pageicon.png" type="image/x-icon" />
<link rel="alternate" type="application/rss+xml" title="We care Arab Page" href="/rss.xml" />
</head>
<body>
!!!!!! everything need right to left, where default page is english (left to right).!!!!!
</body>
</html>
Please advise ? 🙂
Thanks & Regards
Follow up:
-
$this->view->headMeta()->appendName(‘Language’,’en’);
This is not related to DIR -
http://www.w3.org/TR/REC-html40/struct/dirlang.html
This is a solution actually -
It works
< html xmlns=”http://www.w3.org/1999/xhtml” lang=”ar” dir=”RTL” >
-
ZF-> How do you assign it from MVC controller ?
< html xmlns=”http://www.w3.org/1999/xhtml” lang=”ar” dir=< ?= $this->rtl; ? > > ???
-
tried 2 suggestion
< body style=”direction:rtl;” >
OR
< html xmlns=”http://www.w3.org/1999/xhtml” lang=”ar” dir=”RTL” >
Dont see any differences for direction changing. Image does not flip, all the rest flip exactly.
I do most of my web sites in arabic language and i don’t have to depend in
dir="RTL"all the timefor example :
on every project i work with ,
to the right for
div , p , table, em , h1 ... h6 , form input
and some times i add style for p tag
like this :
directtion:RTLto makething align correctly
part of the application to
UTF8form the view to the database … etchopefully i didn’t miss any thing
and Good luck
update
let’s take the facebook.com arabic page as an example , it doesn’t have code like yours
< html xmlns="http://www.w3.org/1999/xhtml" lang="ar" dir="RTL" >,the body tage has style for
direction:RTLyou would see some of the form elements flippedbut notice the world image , it didn’t flip to the left but in your case all the element would flip if you removed this
dir='rtl'attributewhat i meant to say : control your element on the page