Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • andymate Friend
    #133943

    is there a way to change these buttons dinamically in a multilanguage site?

    thx

    andymate Friend
    #273621

    pls. help me with this…isn’t possible thayt nobody is using a multilang version nor asked for this issue…

    thx

    iMonkey Friend
    #273961

    You’re not alone!
    I also wonder how I can solve it.

    andymate Friend
    #273968

    hi imonkeys, thx for the reply….why nobody from the JA team answer to our questions? where is the support?

    iMonkey Friend
    #273977

    In the quickinstallation-package originally, the information (Your Cart is currently empty, etc) has been put to the same color as the background.
    The image (cart + view cart button) can be found in de template folder (map images/color); I took the ‘view cart’-part out completely and changed the color of the information into something more contrasting (file ja-vm.css in templates/ja_larix/css).

    It works for me.

    andymate Friend
    #273978

    thx will try…. 🙂

    Michael Casha Friend
    #275487

    How did you go with that andymate?

    andymate Friend
    #276278

    not bad, i used a workaround for the cart (used another cart) but still have prob with add to cart button

    any suggestion?

    stbrides Friend
    #283802

    This works I have done it – and it works fine.

    Let us imagine you have a French and ~English site
    You have Joomfish and all the language packs installed.
    You cannot translate the buttons as they are images and you cannot switch them with Joomfish – well you can and this is how.

    The buttons are coded for in the ja-vm.css and template._css.css files of JA Larix
    Whatever your template buttons are often coded in the css so find out which files.

    What you must do is create “French” css files and switch the css files the template is running with as the languages on the site changes through the Joomfish language selector.

    I created buttons for my languages in Photoshop using the original buttons as a template.
    They are in the images folder of the template folder in Larix. Find them whatever template you use.

    I called the French buttons different names. If the original was button.png , I call it button_fr.png and so on.

    Open the ja-vm.css and template_css.css files.
    Copy and paste into a blank notepad or Dreamweaver document
    Save these as ja-vm_fr.css and template_css_fr.css – or whatever.

    Within these files the buttons you want to change, as the site language changes, are coded.
    Find them in your French css file
    Change the name of the button name to the name of the French buttons. eg button_fr.png

    FTP the new button images and css files to the server.

    Open the template index file – the index.php file for the template.

    At the top end of the template the css and javascript files are loaded ready for the browser to use.
    Find where the ja-vm.css and template_css.css files are written to the ultimate html document.

    What you want to happen is when the template is running in French the template runs with the French css files and not the default English.
    When it runs with the French css files the French buttons will appear.

    This means adding some php coding to the template where you say if the site language is French write the French css files in otherwise use the English ones.
    You can run any number of languages as long as you have the necessary css files and the php coding.

    The code below is for JA Larix – you will have to think about how you are going to do it for a different template but it is basically the same.


    <link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css" type="text/css" />
    <link rel="stylesheet" href="<?php echo $tmpTools->templateurl();?>/css/editor.css" type="text/css" />

    <!--THIS THE ORIGINAL CODE FOR CSS FILES-->
    <link href=" <?php echo $tmpTools->templateurl();?>/css/template_css.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo $tmpTools->templateurl();?>/css/ja-vm.css" rel="stylesheet" type="text/css" />"
    <!-- END OF SECTION TO CHANGE-->

    <!--THIS IS THE CODE TO PUT IN - THIS IS FOR SPANISH, GERMAN, FRENCH AND THEN DEFAULT ENGLISH-->

    <link href="<?php echo $tmpTools->templateurl();?>

    <?php if ($this->language=="es-es")

    echo "/css/template_css_es.css" rel="stylesheet" type="text/css" />";

    elseif ($this->language=="de-de")
    echo "/css/template_css_de.css" rel="stylesheet" type="text/css" />";

    elseif ($this->language=="fr-fr")
    echo"/css/template_css_fr.css" rel="stylesheet" type="text/css" />";

    else echo "/css/template_css.css" rel="stylesheet" type="text/css" />"; ?>

    <link href="<?php echo $tmpTools->templateurl();?>

    <?php if ($this->language=="es-es")

    echo "/css/ja-vm_es.css" rel="stylesheet" type="text/css" />";

    elseif ($this->language=="de-de")
    echo "/css/ja-vm_de.css" rel="stylesheet" type="text/css" />";

    elseif ($this->language=="fr-fr")
    echo"/css/ja-vm_fr.css" rel="stylesheet" type="text/css" />";

    else echo "/css/ja-vm.css" rel="stylesheet" type="text/css" />"; ?>

    If you have made the buttons, and altered the css files in question by renaming the button images coded within them this will work to switch buttons with the languages.

    It says <?php if ($this->language==”es-es”)…..

    so if the language is es-es that is Spanish then write the Spanish css files to the template,
    elseif the language is fr-fr that is French and so on
    else write the default css file to the template.

    Hope people can follow it – it is a bit of a job to do all the bits but what it also means is if you want to have different css styling for the different languages then you can – so it is not only a button hack:p

    http://www.askspain.org/e-shop

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

This topic contains 9 replies, has 4 voices, and was last updated by  stbrides 15 years, 5 months ago.

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