Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • Anonymous Moderator
    #149823

    Please try to do with my way:

    Example for ja kyanite ii template:

    step 1:
    Please open ja_kyanite_iilayoutsblocksheader.php file, find following code section:

    [PHP]<?php
    $siteName = $this->sitename();
    if ($this->getParam(‘logoType’)==’image’): ?>
    <h1 class=”logo”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php else:
    $logoText = (trim($this->getParam(‘logoType-text-logoText’))==”) ? $config->sitename : $this->getParam(‘logoType-text-logoText’);
    $sloganText = (trim($this->getParam(‘logoType-text-sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $this->getParam(‘logoType-text-sloganText’);?>
    <div class=”logo-text”>
    <h1><a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a></h1>
    <p class=”site-slogan”><?php echo $sloganText;?></p>
    </div>
    <?php endif; ?>
    [/PHP]

    and change to:

    [PHP]
    <?php
    $config =& JFactory::getConfig();
    $language = $config->getValue(‘config.language’);

    $logo_class = “logo”; //default

    if ($language == “vi-VN”) {
    // for vietnamese language
    $logo_class = “logo_vi”;

    } else if ($language == “tr-TR”) {
    // for Turkish
    $logo_class = “logo_tr”;
    }

    $siteName = $this->sitename();
    if ($this->getParam(‘logoType’)==’image’): ?>
    <h1 class=”<?php echo $logo_class;?>”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php else:
    $logoText = (trim($this->getParam(‘logoType-text-logoText’))==”) ? $config->sitename : $this->getParam(‘logoType-text-logoText’);
    $sloganText = (trim($this->getParam(‘logoType-text-sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $this->getParam(‘logoType-text-sloganText’);?>
    <div class=”logo-text”>
    <h1><a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a></h1>
    <p class=”site-slogan”><?php echo $sloganText;?></p>
    </div>
    <?php endif; ?>

    [/PHP]

    step 2

    Open templates/ja_kyanite_ii/css/template.css file, add following code section to the end of file:

    h1.logo_vn { font-size: 250%; line-height: 1; margin: 15px 0 0; }

    h1.logo_vn { float: left; }

    /* Logo Image ---*/
    h1.logo_vn { height: 45px; width: 236px; }

    h1.logo_vn a {
    background: url(../images/logo_vn.gif) no-repeat left center;
    display: block;
    height: 45px;
    width: 236px;
    }

    h1.logo_vn a span { position: absolute; top: -1000px; }

    h1.logo_tr { font-size: 250%; line-height: 1; margin: 15px 0 0; }

    h1.logo_tr { float: left; }

    /* Logo Image ---*/
    h1.logo_tr { height: 45px; width: 236px; }

    h1.logo_tr a {
    background: url(../images/logo_tr.gif) no-repeat left center;
    display: block;
    height: 45px;
    width: 236px;
    }

    h1.logo_tr a span { position: absolute; top: -1000px; }

    For my guider, you can use a logo image for a language.

    Please click thank you button if my guider is good for you. Thanks a lot.

    simoslav Friend
    #337772

    sorry but can you please give more explications , its for a site with how much languages ?

    simoslav Friend
    #337795

    i need a solution for a 3 or 4 languages website please

    Anonymous Moderator
    #337849

    <em>@simoslav 171377 wrote:</em><blockquote>sorry but can you please give more explications , its for a site with how much languages ?</blockquote>

    => You can modify my code for multi languages.

    It is easy to it.

    Anonymous Moderator
    #337850

    For example:

    if ($language == “vi-VN”) {
    // for vietnamese language
    $logo_class = “logo_vi”;

    } else if ($language == “tr-TR”) {
    // for Turkish
    $logo_class = “logo_tr”;
    } else if ($language == “th-TH”) {
    $logo_class = “logo_th”;
    } else if ($language == “ta-LK”) {

    $logo_class = “logo_td”;
    } else if ($language == “tl-PH”) {

    $logo_class = “logo_tl”;
    }

    ……………

    simoslav Friend
    #337904

    thanks alot 🙂 its worked just there is a small problem , when for example im in english and i switch to the french version there is a problem , the home still leading to the english website but only with one menu item shown : Home , the others menu items do not appear
    normally its must show site.com/fr and site.com/en and site.com/ar
    its was working this way before i change to this new code

    simoslav Friend
    #338144

    solved , was an issue between sh404sef and joomfish , thanks alot ! now all is working fine

    harsa Friend
    #342614

    how about for JA Opal? do i have to change at the index.php or where?

    /harsa

    Saguaros Moderator
    #342799

    Dear harsa!

    Here is the short solution to resolve your issue:

    pls open the file templatesja_opalindex.php and find the following code:
    [PHP]
    <?php
    $siteName = $tmpTools->sitename();
    if ($tmpTools->getParam(‘logoType’)==’image’) { ?>
    <h1 class=”logo”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php } else {
    $logoText = (trim($tmpTools->getParam(‘logoText’))==”) ? $config->sitename : $tmpTools->getParam(‘logoText’);
    $sloganText = (trim($tmpTools->getParam(‘sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $tmpTools->getParam(‘sloganText’); ?>
    <div class=”logo-text”>
    <p class=”site-slogan”><?php echo $sloganText;?></p>
    <h1>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a>
    </h1>
    </div>
    <?php } ?>
    [/PHP]
    [PHP]
    <?php
    $config =& JFactory::getConfig();
    $language = $config->getValue(‘config.language’);

    $siteName = $tmpTools->sitename();
    if ($tmpTools->getParam(‘logoType’)==’image’) { ?>
    <h1 class=”logo <?php echo strtolower($language) ;?>”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>
    <?php } else {
    $logoText = (trim($tmpTools->getParam(‘logoText’))==”) ? $config->sitename : $tmpTools->getParam(‘logoText’);
    $sloganText = (trim($tmpTools->getParam(‘sloganText’))==”) ? JText::_(‘SITE SLOGAN’) : $tmpTools->getParam(‘sloganText’); ?>
    <div class=”logo-text”>
    <p class=”site-slogan”><?php echo $sloganText;?></p>
    <h1>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $logoText; ?></span></a>
    </h1>
    </div>
    <?php } ?>
    [/PHP]

    now, i give you example on this,

    suppose that you site has two languages: English and Turkish, and you would like to override logo for the Turkish language, you ‘ll do this as following:

    1) language code of Turkish language is “tr-TR

    you’ll add the following css into the template:

    h1.tr-tr a {
    background: url(../images/logo-tr-tr.png) no-repeat center !important;
    }

    with other you ‘ll do as so

    Good luck

    harsa Friend
    #342812

    dear tienhc,
    thank you very much.. problem is solved..

    /harsa

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 10 replies, has 4 voices, and was last updated by  harsa 14 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum