Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • peters256 Friend
    #149573

    Hello,

    I have a web site in 2 languages: french & english
    And the deal is to change the image logo when the languages change.

    The template is loaded in the component.php :

    <head>
    <jdoc:include type="head" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/ja_teline_iii/css/addons.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/ja_teline_iii/css/template.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/ja_teline_iii/css/print.css" type="text/css" />
    </head>

    So I copy the file “template.css” and rename like this
    the original template : en-gb.css
    the copy template : fr-fr.css (in this template I change the link to the logo image)

    And of course I change the line code in component.php :

    <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/<?php echo $this->language ?>.css" type="text/css" />

    But now the web site doesn’t find any template.

    And if I leave the current template in place, and I let my modified code, it works.
    So I don’t understand…if anyone have a idea ??
    Where is the template loaded ?

    Thanks in advance.

    Peters

    gray Friend
    #336458

    This code form header.php displays the logo
    [php]
    <h1 class=”logo”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>
    [/php]

    To my mind it’s not necessry to make 2 CSS files, but to create separate class style for <a>, like logo-fr-fr and logo-en-us and difine it in tesmplate.css.

    [php]
    <h1 class=”logo-<?php echo $this->language ?>”>
    <a href=”index.php” title=”<?php echo $siteName; ?>”><span><?php echo $siteName; ?></span></a>
    </h1>
    [/php]

    peters256 Friend
    #336480

    Hello,

    thanks you very much for this great idea.
    It works very well.

    Just 2 things to do :
    1 : change the header.php like you say.

    2 : change the template.css; but attention you need to change 3 things
    h1.logo (in /*header*/)
    h1.logo a (in /*logo image*/)
    h1.logo a span (in /*logo image*/)

    For my case (fr-fr and en-gb), my code is this :

    /* HEADER
    --------------------------------------------------------- */
    #ja-header { z-index: 10; position: relative; }

    #ja-header .main { padding: 30px 0 10px; }

    h1.logo, div.logo-text h1 {
    font-size: 300%;
    line-height: 1;
    }

    h1.logo, div.logo-text { float: left; }

    h1.logo-fr-fr { float: left; }

    h1.logo-en-gb { float: left; }

    /* Logo Image ---*/
    h1.logo {
    width: 265px;
    height: 62px;
    margin: 0;
    }

    h1.logo-fr-fr a {
    width: 429px;
    height: 62px;
    display: block;
    background: url(../images/logo-fr.gif) no-repeat left;
    }

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

    h1.logo-en-gb a {
    width: 429px;
    height: 62px;
    display: block;
    background: url(../images/logo-en.gif) no-repeat left;
    }

    h1.logo-en-gb a span {
    position: absolute;
    top: -1000px;
    }

    Thanks again.
    Peters

    peters256 Friend
    #336481

    and I see that the search button disappear when I change the language ….

    any idea of this problem ?

    peters256 Friend
    #336488

    Oups, sorry.

    I published the joomfish module on “Search button : No”

    Everything is ok now : “Search button : Yes”

    kha007 Friend
    #336989

    Hi
    I’m in the same situation as you, but unless I’m uncomfortable with the php code, can better explain to me. for example to color in parts modifer.Cela to make me a great service.

    See you.

    kha007 Friend
    #337042

    thank you
    I tried your php code and it’S working.

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

This topic contains 7 replies, has 3 voices, and was last updated by  kha007 14 years, 7 months ago.

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