DalyMhy's avatar

Laravel RTL transformation

Hello! I'm working on a multi-Lang language I have been installed Franch and Arabic successfully. Now I need to transform the layout from RTL to LTR and thank's.

0 likes
7 replies
Sinnbeck's avatar

Dont you mean LTR to RTL? (Left to Right is default).

Is this what you are after (css)?

body {
  direction: rtl;
}
DalyMhy's avatar

I have already make the multi-lang and it work successfully, just i need to transform RTL TO LTR with the arabic language

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Then you just need to change the direction.

One idea is to just change the dir in the body tag

<body dir="{{(App::isLocale('ar') ? 'rtl' : 'ltr')}}">
6 likes
nomi's avatar

@Sinnbeck Thank you for the cool tip. Does this method depend on the way the HTML/CSS is constructed? Or it will work equally well in any well-formatted HTML template?

Sinnbeck's avatar

@nomi I'm not completely sure what you mean, but generally it just works. My only thought would be if you overwrite it using css

body {
  direction: rtl;
} 

Please or to participate in this conversation.