WordPress.org

Ready to get started?Download WordPress

Forums

Smooth Slider
how to make the slider multi-language? (4 posts)

  1. globalreporter
    Member
    Posted 1 year ago #

    I think Smooth Slider plugin is really great. But I have an issue I cannot solve by myself. I have a multi-language website (English/Italian) and I would like to show language-specific posts in my slider. Unfortunately, the slider mixes up posts in both languages, as you can see here on this sample page:

    http://www.freereporter.info/smooth-slider/
    http://www.freereporter.info/it/smooth-slider/

    I was wandering if placing a specific tag in the PHP post file would make the slider multi-language.

    I would be grateful if you could help.

    http://wordpress.org/extend/plugins/smooth-slider/

  2. globalreporter
    Member
    Posted 1 year ago #

    Any chance to have a feedback on this?

  3. killernaggy
    Member
    Posted 1 year ago #

    What system/plugin are you using to make the site multi-language? If you are using qTranslate plugin you just need some minor changes to make the slider multi-language. In case this is your case this changes made in "slider-versions/smooth_1.php" worked for me:

    • (line 10)
      change $post_title = stripslashes($post->post_title); to this
      $post_title = stripslashes(qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($post->post_title));
    • (line 14)
      change
      $slider_content = $post->post_content;
      to this
      $slider_content = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($post->post_content);
    • (around line 232)
      change
      $sldr_title = get_smooth_slider_name($slider_id);
      to this
      $sldr_title = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage(get_smooth_slider_name($slider_id));
    • (around line 234)
      change
      else $sldr_title = $smooth_slider['title_text'];
      to this
      else $sldr_title = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($smooth_slider['title_text']);
  4. kudosestudio
    Member
    Posted 11 months ago #

    Thanks killernaggy!! this works perfectly!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.