How to automatically change the site direction LTR\RTL?

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

6 replies · 705 views · started 16 years ago · 1 min read

3 participants
SeLover Newbie · 4 posts #1

Hi all 😊

I am looking to make my site bilingual (Arabic\English) that's mean 2 different directions

English => LTR "Left To Right" Arabic => RTL "Right To Left"

so, i need a script "Like facebook" that when the user choose Arabic Language the site will change the whole template+Text to RTL, and the exact opposite when choose English language.

Thanks & Best Regards,

P.S I've searched on this forum for this case, but i didn't find a useful info, so if there is a post talk about the same issue and it's [Resolved] kindly put the link below. 😊

subzero Super moderator Fellow · 3,954 posts #2

i know there badward words

i dont know why they need to be swap. i think it does it auto

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

GumSlone Administrator Principal · 1,690 posts #3

SeLover wrote: Hi all 😊

I am looking to make my site bilingual (Arabic\English) that's mean 2 different directions

English => LTR "Left To Right" Arabic => RTL "Right To Left"

so, i need a script "Like facebook" that when the user choose Arabic Language the site will change the whole template+Text to RTL, and the exact opposite when choose English language.

Thanks & Best Regards,

P.S I've searched on this forum for this case, but i didn't find a useful info, so if there is a post talk about the same issue and it's [Resolved] kindly put the link below. 😊

i think the browser does it automatically.

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

SeLover Newbie · 4 posts #4

no the script that i am using is not supporting the Auto swap 🙁

some people ask me to use if code

if lang_id=2 // for arabic then use style-rtl.css

can someone help me to make this code

subzero Super moderator Fellow · 3,954 posts #5

if($lang_id == "2") { Your css here }else{ English css here }

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

SeLover Newbie · 4 posts #6

subzero wrote: if($lang_id == "2") { Your css here }else{ English css here }

thanks , but it doesn't work 🙁 , it's shown blank page 🙁

how i can make it <if ---- </if> "php code" ?

with these parameters:

lang_id=2 // Arabic, lang_id=1 arabic style = rtl.css normal style= style.css

SeLover Newbie · 4 posts #7

Just right now i've got an e-mail from friend told me the script is using these codes

in header template file

{* INLUCDE MAIN SHEET *}

<link rel="stylesheet" href="./templates/styles_global.css" title="stylesheet" type="text/css" /> <link rel="stylesheet" href="./templates/styles.css" title="stylesheet" type="text/css" /> <link rel="stylesheet" href="./templates/progress.css" title="stylesheet" type="text/css" />

in header.php

// CREATE GLOBAL CSS STYLES VAR (USED FOR CUSTOM USER-DEFINED PROFILE/PLUGIN STYLES) $global_css = "";

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close