Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Location
    Montreal, Quebec, Canada
    Posts
    28
    Plugin Contributions
    0

    Default Display image according to the language

    Good afternoon!

    I'm looking for a way to link a image with a selected language .

    This background image is actualy displaying navigation menus, so I need it to display in the correct language!

    I've created the two images and called them

    topmenubg_english.gif
    topmenubg_french.gif



    My site works fine right now with the english image always showing, whether the language is english or french.

    the file current image used is topmenubg.gif


    I found mention of it in this file, but don't know what to do with this information


    /includes/templates/(CUSTOM-TEMPLATE)/css/colors.css

    #navMain { background-color: #FFFFFF; background-image: url('../images/topmenubg.gif'); background-repeat: no-repeat }



    Is there a way for me to program something like:

    If language is = english, ('../images/topmenubg_english.gif')
    else ('../images/topmenubg_french.gif')


    or sometime along those lines???

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Display image according to the language

    It's much easier. It's built into Zen Cart that a stylesheet called french_stylesheet.css will load automatically, but only when the site is displaying pages in French (works for other languages too).
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Apr 2008
    Location
    Montreal, Quebec, Canada
    Posts
    28
    Plugin Contributions
    0

    Default Re: Display image according to the language

    really?!

    great!! that program never cease to amaze me

    ok so, would that new file (french_stylesheet.css) be in the same folder as the other css files?

    right now, I have:
    /includes/templates/(CUSTOM-TEMPLATE)/css/

    colors.css
    layout.css
    stylesheet.css
    print_stylesheet.css
    <-- french_stylesheet.css goes here?

    and should I ONLY write the line concerning my image in that css file? or do I need to copy-paste the english css and modify the line concerning my image?

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Display image according to the language

    Oui! oui, oui et non.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Apr 2008
    Location
    Montreal, Quebec, Canada
    Posts
    28
    Plugin Contributions
    0

    Default Re: Display image according to the language

    haha

    non à quoi au juste?

    non to
    I ONLY write the line concerning my image

    or

    non to
    copy-paste the original css and modify the line for my image

    (btw, thanks a lot kuroi )

  6. #6
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Display image according to the language

    non to
    copy-paste the original css and modify the line for my image

    You only to to change the line the has the location of the image that you wish to vary by language.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Banners display according to language
    By jadn79 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Jan 2012, 04:05 PM
  2. Replies: 0
    Last Post: 25 Sep 2010, 11:15 AM
  3. Flash banner according to language
    By littlehawk in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 4 Nov 2009, 04:36 AM
  4. different logo.gif according to language
    By stephane in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Nov 2006, 06:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg