• Hello,

    i would like to load the plugin in a multi-language environment with Polylang, how can i load it with php? i tried this in a first attempt:

    <?php if(function_exists('crellySlider')) && ( is_language( 'en' ) ){
      crellySlider('en_index');
    }
    
    else if(function_exists('crellySlider')) && ( is_language( 'de' ) ){
      crellySlider('de_index');
    }
    
    else if (function_exists('crellySlider')) && ( is_language( 'it' ) ){
      crellySlider('it_index');
    }  ?>

    php version is 7.x(latest)…

    How can this be achieved, is there a simplier method?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Fabio Rinaldi

    (@fabiorino)

    Maybe there’s a way to automate that process. You could create a script that chains the the language identifier with the string “_index”.

    Something like (pseudocode):

    sliderAlias = getLanguageID() + "_index";
    if(function_exists("crellySlider") {
        crellySlider(sliderAlias);
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Mltilanguage with polylang’ is closed to new replies.