WordPress.org

Ready to get started?Download WordPress

Forums

WP Parallax Content Slider
[resolved] Use different static sliders for different languages? (6 posts)

  1. biotess
    Member
    Posted 1 year ago #

    Hello!
    I am designing a blog with 2 languages and I'm trying to show static slides with translated text.

    ¿How could I show a different static slideshow depending of the language of the user?
    I was thinking in an answer related to the Multiple Static Sliders solved problem.

    Thank you so much in advance!

    EDIT: I'm using qTranslate plugin

    http://wordpress.org/extend/plugins/wp-parallax-content-slider/

  2. biotess
    Member
    Posted 1 year ago #

    Yay! I have solved it! ^_^ If anyone else is trying it, I have replaced:

    include('static-slides-sample.php');

    by

    if ($_GET['lang']=='es')
    { include('static-slides-spanish.php'); }
    
    else if ($_GET['lang']=='ca')
    { include('static-slides-catalan.php'); }
    
    else { include('static-slides-spanish.php'); }

    Where "static-slides-spanish.php" is the Spanish slideshow by default, and "static-slides-catalan.php" is the same slideshow, but translated to Catalan.

  3. wp-maverick
    Member
    Plugin Author

    Posted 1 year ago #

    ¡Ola!
    That's great, I hope this will help other users.
    Thanks for sharing ;)

  4. asmayasrib
    Member
    Posted 1 year ago #

    exactly what I needed! thanks for sharing the info.

  5. Agentur Pixelportal
    Member
    Posted 1 year ago #

    Unfortunately it does not work for me.
    But here is my solution. First, you must delete the following line
    include('static-slides-sample.php');

    if(qtrans_getLanguage()=='de')
    { include('static-slides-german.php'); }

    elseif(qtrans_getLanguage()=='en')
    { include('static-slides-english.php'); }

    elseif(qtrans_getLanguage()=='fr')
    { include('static-slides-french.php'); }

    if ($prlx_slider_mode === 'dynamic')
    {
    print $outputDynamic.$outputScript;
    }
    else
    {
    print $outputStatic.$outputScript;
    }

  6. wp-maverick
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Mojoberlin,
    since you use qTranslate, I think the 'language test' cannot be the same as biotess.

    There are many ways to manage the plugin translation, especially for static slides and I wish it was simpler. I want to write a FAQ entry to talk about that stuff but before, I want to figure out how to make the proper test depending on the i18n implementation of the WordPress install:
    if(qtrans_getLanguage()=='xx')
    or
    if ($_GET['lang']=='xx')
    or others...

    If someone here has good ideas on how to implement something nicely, feel free to share it with us ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic