• The issue can be found here: http://nikanishk.ca/a-propos-du-projet/
    The preview works: Yes
    It works with other themes: Haven’t Tried – using twentythirteen
    It works when I disable all other plugins: Haven’t Tried
    Meta Slider version: 2.6.3

    Trying to get slideshows to appear in both languages on a bilingual site using this code in my header.php

    if(ICL_LANGUAGE_CODE==’en’) {
    echo do_shortcode(“[metaslider id=1427]”); }
    if(ICL_LANGUAGE_CODE==’fr’) {
    echo do_shortcode(“[metaslider id=1425]”); }

    Only the slider in the default language (French) ever appears. Not sure what is going wrong here….

    https://wordpress.org/plugins/ml-slider/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi Coriander,

    Could you try changing this:

    if(ICL_LANGUAGE_CODE=='en') {

    to this:

    if(ICL_LANGUAGE_CODE=='en-US') {

    Regards,
    Tom

    Thread Starter coriander

    (@coriander)

    Sure, I just tried it.

    But I also echoed the ICL_LANGUAGE_CODE and it is ‘en’

    Hmm.. strange!

    If you do:

    if (ICL_LANGUAGE_CODE=='en') {
        echo "something something";
    }

    does it echo “something something” to the page?

    Thread Starter coriander

    (@coriander)

    Yes it does!

    Ah, looking at the page source, the slideshow is there but the slides are not.

    I’m afraid I’ll need to get in touch with WPML and ask them for another test copy (they revoked my access to it once Meta Slider was ticked off as being compatible) and test again. I think something must have changed on their end as the Meta Slider code regarding the WPML compatibility hasn’t changed since it was added.

    I’ll update you here once I know something.

    Thread Starter coriander

    (@coriander)

    Ok, thank you so much for looking into it.

    Hi Coriander,

    I’ve set up WPML with 2 languages and it’s all looking OK here.

    Silly question.. but could you double check the slideshow ID (1427) is correct and that slides exist in the admin section?

    Regards,
    Tom.

    Thread Starter coriander

    (@coriander)

    Hi Tom,

    Yes, that was the correct ID. But I just tried creating new sliders with new IDs, now nothing seems to be working at all 🙁
    Neither slider is displaying.

    When I switched language in the top admin bar to try to create a slider in English, that slider then disappeared and is only accessible when French is selected as the language in the admin bar.

    C

    Thread Starter coriander

    (@coriander)

    Ok, wait. success!
    I started again from scratch and it works.

    Thank you for your efforts, sorry to have made work for you.

    C

    I also use MS Pro and WPML, and I added another slider to translate the first (english) into Dutch, and now they are both Dutch!!!! How can that be??? I called the first one Slider English and the second one Slider Dutch, but now I translated them both???

    Hi Jack,

    The slides themselves are not translated. One slide = one media file = one caption. If you add the same slide to multiple slideshows the caption will update across all slideshows.

    There are 2 options: Duplicate the media file so each slideshow has a unique copy.

    Or, see this thread: https://wpml.org/forums/topic/conditional-language-shortcode/. Someone has posted some code there which should go into your themes functions.php file. After that, you should be able to specify something like this as the caption text on the slide:

    [wpml_language language="en"]English Caption[/wpml_language][wpml_language language="nl"]Dutch Caption[/wpml_language]

    We might look at incorporating this code directly into Meta Slider if it works well. qTranslate supports similar functionality by default, it seems like a nice way to do things.

    Regards,
    Tom.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Meta slider and WPML’ is closed to new replies.