Jump to content

try to ltr and rtl


3245

Recommended Posts

Hello

i want have tow css when loading website, but when i want add below code in header.tpl , i cant see any difference:

 

{if $language eq 'Farsi'}

<link rel="stylesheet" type="text/css" href="templates/{$template}/style.css" />

{else}

<link rel="stylesheet" type="text/css" href="templates/{$template}/style-ltr.css" />

{/if}

 

how i can know what is problem?

 

Thanks.

Link to comment
Share on other sites

what do you mean by "i cant see any difference"? do you mean that CSS files not loaded correctly or your template/design unable to read changes depending on your CSS.

 

explain your issue or put your clientarea URL so we can help

 

greetz

Link to comment
Share on other sites

means when i select persian, i see right to left, and when i select english, i see same right to left, just with english language, dont use css i used in below cod.

Edited by 3245
Link to comment
Share on other sites

I think the $language variable is always lower-case, so your code should probably be...

 

{if $language eq 'farsi'}
<link rel="stylesheet" type="text/css" href="templates/{$template}/style.css" />
{else}
<link rel="stylesheet" type="text/css" href="templates/{$template}/style-ltr.css" />
{/if}

Link to comment
Share on other sites

i tested with lower-case, but still same problem

my header code is below:

 

<!DOCTYPE html>

<html lang="en">

<head>

 

 

<meta name="keywords" content="" />

<meta name="description" content="" />

<meta name="robots" content="index, follow" />

<meta name="author" content="" />

<meta http-equiv="content-type" content="text/html; charset={$charset}" />

<title>{if $kbarticle.title}{$kbarticle.title} - {/if}{$pagetitle} - {$companyname}</title>

 

{if $systemurl}<base href="{$systemurl}" />

{/if}<script type="text/javascript" src="includes/jscript/jquery.js"></script>

{if $livehelpjs}{$livehelpjs}

{/if}{$headoutput}

<link href="templates/{$template}/css/bootstrap.css" rel="stylesheet">

<link href="templates/{$template}/css/whmcs.css" rel="stylesheet">

 

<script src="templates/{$template}/js/whmcs.js"></script>

 

{$headoutput}

 

{if $language eq 'farsi'}

<link rel="stylesheet" type="text/css" href="templates/{$template}/style.css" />

{else}

<link rel="stylesheet" type="text/css" href="templates/{$template}/style-ltr.css" />

{/if}

 

</head>

 

<body>

 

{$headeroutput}

 

<div id="whmcsheader" align="center">

<div class="whmcscontainer">

<div id="whmcstxtlogo"><a href="index.php">{$companyname}</a></div>

<div id="whmcsimglogo"><img src="templates/{$template}/img/whmcslogo.png" alt="{$companyname}" /></div>

</div>

</div>

 

<div class="topbar">

<div class="fill">

<div class="whmcscontainer">

 

<ul>

<li><a href="{if $loggedin}clientarea{else}index{/if}.php">{$LANG.hometitle}</a></li>

</ul>

{if $loggedin}

<ul>

<li class="menu">

<a href="#" class="menu">{$LANG.navservices}</a>

<ul class="menu-dropdown">

<li><a href="clientarea.php?action=products">{$LANG.clientareanavservices}</a></li>

<li class="divider"></li>

<li><a href="cart.php">{$LANG.navservicesorder}</a></li>

<li><a href="index.php?m=unblockip">{$LANG.unblockip}</a></li>

<li><a href="cart.php?gid=addons">{$LANG.clientareaviewaddons}</a></li>

</ul>

</li>

</ul>

 

<ul>

<li class="menu">

<a href="#" class="menu">{$LANG.navdomains}</a>

<ul class="menu-dropdown">

<li><a href="clientarea.php?action=domains">{$LANG.clientareanavdomains}</a></li>

<li class="divider"></li>

<li><a href="cart.php?gid=renewals">{$LANG.navrenewdomains}</a></li>

<li><a href="cart.php?a=add&domain=register">{$LANG.navregisterdomain}</a></li>

<li><a href="cart.php?a=add&domain=transfer">{$LANG.navtransferdomain}</a></li>

<li class="divider"></li>

<li><a href="domainchecker.php">{$LANG.navwhoislookup}</a></li>

</ul>

</li>

</ul>

 

<ul>

<li class="menu">

<a href="#" class="menu">{$LANG.navbilling}</a>

<ul class="menu-dropdown">

<li><a href="clientarea.php?action=invoices">{$LANG.invoices}</a></li>

<li><a href="clientarea.php?action=addfunds">{$LANG.addfunds}</a></li>

<li><a href="clientarea.php?action=quotes">{$LANG.quotestitle}</a></li>

</ul>

</li>

</ul>

 

<ul>

<li class="menu">

<a href="#" class="menu">{$LANG.navsupport}</a>

<ul class="menu-dropdown">

<li><a href="supporttickets.php">{$LANG.navtickets}</a></li>

<li><a href="knowledgebase.php">{$LANG.knowledgebasetitle}</a></li>

<li><a href="downloads.php">{$LANG.downloadstitle}</a></li>

<li><a href="serverstatus.php">{$LANG.networkstatustitle}</a></li>

</ul>

</li>

</ul>

 

<ul>

<li><a href="submitticket.php">{$LANG.navopenticket}</a></li>

</ul>

 

<ul>

<li><a href="affiliates.php">{$LANG.affiliatestitle}</a></li>

</ul>

 

<ul class="nav secondary-nav">

<li class="menu">

<a href="#" class="menu">{$LANG.hello}, {$loggedinuser.firstname}!</a>

<ul class="menu-dropdown">

<li><a href="clientarea.php?action=details">{$LANG.editaccountdetails}</a></li>

<li><a href="clientarea.php?action=creditcard">{$LANG.navmanagecc}</a></li>

<li><a href="clientarea.php?action=contacts">{$LANG.clientareanavcontacts}</a></li>

<li><a href="clientarea.php?action=addfunds">{$LANG.addfunds}</a></li>

<li><a href="clientarea.php?action=emails">{$LANG.navemailssent}</a></li>

<li><a href="clientarea.php?action=changepw">{$LANG.clientareanavchangepw}</a></li>

<li class="divider"></li>

<li><a href="logout.php">{$LANG.logouttitle}</a></li>

</ul>

</li>

</ul>

{else}

<ul>

<li><a href="announcements.php">{$LANG.announcementstitle}</a></li>

</ul>

<ul>

<li><a href="knowledgebase.php">{$LANG.knowledgebasetitle}</a></li>

</ul>

<ul>

<li><a href="serverstatus.php">{$LANG.networkstatustitle}</a></li>

</ul>

<ul>

<li><a href="affiliates.php">{$LANG.affiliatestitle}</a></li>

</ul>

<ul>

<li><a href="contact.php">{$LANG.contactus}</a></li>

</ul>

 

<ul class="nav secondary-nav">

<li class="menu">

<a href="#" class="menu">{$LANG.account}</a>

<ul class="menu-dropdown">

<li><a href="clientarea.php">{$LANG.login}</a></li>

<li><a href="register.php">{$LANG.register}</a></li>

<li class="divider"></li>

<li><a href="pwreset.php">{$LANG.forgotpw}</a></li>

</ul>

</li>

</ul>

{/if}

</div>

</div>

</div>

 

<div class="whmcscontainer">

<div class="contentpadded">

 

{if $pagetitle eq $LANG.carttitle}<div id="whmcsorderfrm">{/if}

 

 

Please help me.

 

Thanks.

Link to comment
Share on other sites

sentq is correct - someone will likely need to see your url.

 

I just tried your {if} statement in our header - as we don't have access to your css, I tweaked the code a little...

 

{if $language eq 'farsi'}
fred
{else}
wilma
{/if}

it does work - says "fred" when farsi is chosen, and "wilma" at other times - though doesn't work when using 'Farsi' with a capital 'F'...

 

another thing to try might be to empty your template cache...

-> utilities -> system -> system cleanup -> empty template cache...

 

it might be that your browser is not showing the updated page but using one already in the cache - if that doesn't work, you might try clearing the browser cache too.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated