Page 1 of 2 12 LastLast
Results 1 to 10 of 70

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    4
    Plugin Contributions
    0

    Default multi lingual banners

    Hi,
    Is this possible to set up banners that will only display in a certain language. Fro instance I have my site in Anglish and French, I want to display the banner in French for french and in english for other nationalities.

    Can we do it?

    How can I have several banners running in parallele.

    Cordialement,
    /rs, A

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: multi lingual banners

    You could build multiple banner groups and then where each banner group appears have it utilize a different group based on language ...

    Right now, it pulls based only on the banner group name ...

    With a bit of thought you could have the banner sidebox that uses:
    SHOW_BANNERS_GROUP_SET7

    Actually utilize an more customized method such as:
    PHP Code:
        $banner_box_groupSHOW_BANNERS_GROUP_SET7 $_SESSION['languages_id']; 
    This would alter the name of the banner group based on the language so if you had a group called:
    fred1 for english
    fred2 for french
    etc. etc.

    depending on how your languages are setup, you could build language oriented banners ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Nov 2006
    Posts
    32
    Plugin Contributions
    0

    help question Re: multi lingual banners

    Hi,
    i made your changes in the php-file, but what i have to do with fred1, fred2?
    Could you be so kind and give me any hint?

    Thank you very match

    Gerd

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: multi lingual banners

    If you were to enter in the Configuration ... Layout Settings ... the word:
    fred

    for the setting on:
    Banner Display Groups - Side Box banner_box
    The Banner Display Groups can be from 1 Banner Group or Multiple Banner Groups

    For Multiple Banner Groups enter the Banner Group Name separated by a colon :

    Example: Wide-Banners:SideBox-Banners
    Default Group is SideBox-Banners

    What Banner Group(s) do you want to use in the Side Box - banner_box?
    Leave blank for none
    This should produce fred1 fred2 fred3 etc. for the languages ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Nov 2006
    Posts
    32
    Plugin Contributions
    0

    Default Re: multi lingual banners

    Hi Ajeh,

    i wrote this:

    $banner_box_group= SHOW_BANNERS_GROUP_SET7 . $_SESSION['languages_id'];

    to the /httpdocs/includes/modules/sideboxes/banner_box.php

    I leave this in the Layout Settings unchanged:
    Banner Display Groups - Side Box banner_box SideBox-Banners

    (I understood this will produce fred1, fred2 etc.)

    What a name for the banner group now i have to use in the Banner Manager ?

    just fred1 or fred2 or
    SideBox-Banners-fred1 etc.

    After i changed the php-file the the banner disapeares

    I am sure it is easy, but...

    Could you one nore try to help http://www.zen-cart.com/forum/images/smilies/mellow.gif


    many thanks

    Gerd

  6. #6
    Join Date
    Nov 2006
    Posts
    32
    Plugin Contributions
    0

    Default Re: multi lingual banners

    Hi Ajeh,

    could you be so kind and give me a bit more information?

    Thank you very much...

    Gerd

  7. #7
    Join Date
    Jan 2010
    Location
    New Jersey
    Posts
    9
    Plugin Contributions
    0

    Idea or Suggestion Re: multi lingual banners

    Quote Originally Posted by 27gerd27 View Post
    Hi,
    i made your changes in the php-file, but what i have to do with fred1, fred2?
    Could you be so kind and give me any hint?

    Thank you very match

    Gerd
    See post #48 in this thread, I think I found an easier method to display multilingual banners.

    Good luck!

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: multi lingual banners

    That will work fine for two languages, but not for more.
    Balihr's directions in post 22 are the correct answer, if followed exactly. I reproduce them here, with red highlighting on the points that people seem to be missing:

    I wanted my header's Wide-Banners to be multi-lingual.

    So, for all those still looking for the answer, here we go:

    1. Locate your tpl_header.php file and find this line:
    Code:
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))
    and replace it with
    Code:
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2 . $_SESSION['languages_id']))
    2. Go to Configuration->Layout Settings and change Banner Display Groups - Header Position 2 to show Wide-Banners (write that in the field)

    3. Go to Tools->Banner Manager. Edit your banner for your first language and manually assign it to banner group Wide-Banners1. Edit your banner for your second language and manually assign it to banner group Wide-Banners2. Notice the number 1 - this number represents your language id. Therefore, if you have english (1), german (2) etc, Wide-Banners1 will show when english language is selected and Wide-Banners2 when german is selected. Note: language ids are related to your installed languages, not a general code - if you don't know what id you want to use, simply try different numbers 1,2,3,4,5...

    And that's it! If you want to use it on a different position, change the GROUP_SET number accordingly.

    Could it be any easier?

    This also works with Flash banners (if you previously set up Flash to run). If you want a Flash banner, use the HTML banner version...

    All thanks go to Ajeh!
    (end of balihr's instructions)
    Last edited by gjh42; 13 Nov 2010 at 07:52 PM.

  9. #9
    Join Date
    Feb 2011
    Posts
    14
    Plugin Contributions
    0

    Default Re: multi lingual banners

    thanks!
    on my site it works fine for one banner!
    but i have three!

    Banner Display Groups - Header Position 1 banner-1
    Banner Display Groups - Header Position 2 banner-2
    Banner Display Groups - Header Position 3 Wide-Banners (now called)

    so i have tested out different ways, but with no success.

    when i am doing the same steps with the other banners they are mixed.

    any suggestions?
    thanks.

  10. #10
    Join Date
    Jul 2009
    Posts
    402
    Plugin Contributions
    0

    Default Re: multi lingual banners

    Quote Originally Posted by gjh42 View Post
    That will work fine for two languages, but not for more.
    Balihr's directions in post 22 are the correct answer, if followed exactly. I reproduce them here, with red highlighting on the points that people seem to be missing:
    All thanks go to Ajeh!
    (end of balihr's instructions)
    Hi I am looking for having multilingual banner in the side boxes.
    Therefore coupling the above concept I mod the tpl_banner_box_all.php and set the layout to show in side banner box all, the group bannersAll.


    Code:
    $banner_cnt = 0;
      while (!$banners_all->EOF) {
        $banner_cnt++;
        $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET_ALL . $_SESSION['languages_id']);
        $content .= zen_display_banner('static', $banners_all->fields['banners_id'] . $_SESSION['languages_id']);
    I found in the db the languages id of my languages that are 2 for italian and 4 for english. I then assigned the localized banners to bannersAll2 and bannersAll4 but, unfortunately the result is no banners shown!
    I am stuck now, because my knowledge is limited.
    Can someone help?
    Thanks
    Enzo
    Last edited by enzo-ita; 13 Apr 2011 at 09:01 PM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. multi lingual banners
    By jfl_saudi in forum Basic Configuration
    Replies: 2
    Last Post: 29 Nov 2010, 11:41 AM
  2. I'd like to make my site multi-lingual...
    By joyjoy in forum Addon Language Packs
    Replies: 8
    Last Post: 4 Nov 2010, 07:36 AM
  3. Replies: 2
    Last Post: 27 Apr 2010, 06:25 PM
  4. Multi lingual ez-pages link to more information sidebox.
    By juza123 in forum Basic Configuration
    Replies: 0
    Last Post: 12 Mar 2007, 03:57 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