This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

How to translate a slider with WPML

  • Creator
    Topic
  • #9070
    dschragg
    Member

    I’m wondering how I can translate the text that’s included on image sliders?
    Buttons, links, photo, description, etc…

    I have the WPML bridge installed, the template, WordPress, and WPML are all the most recent versions, but I can’t figure out how to translate these items?

    Any help is greatly appreciated…

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #9071
    Jason Bobich
    Keymaster

    Hello,

    You wouldn’t translate the slider, but instead create two different ones. How is your slider currently being displayed on your site? What is the specific scenario in which you’re doing this?

    #9079
    dschragg
    Member

    Currently I’m using WPML to allow for 2 languages, French and English, English being the primary.
    When viewing the French side, the slider text shows up in English, but this is because I haven’t translated it yet.
    The text entered into the sliders in the backend doesn’t show up under String Translation?

    You’re saying I should create a second slider for the French side, but how do I ensure that the French slider only shows on the French side? Where is this assignment made?

    You can see the site here (still lots of work to be done): http://sb.unac.org/
    French link is up top….

    As a side note….where would I disable sanitization on the sliders? The changes I make don’t seem to disable it?
    Also where do I remove the quotes “that the slider text is wrapped in”?

    Thanks for such a quick response, I appreciate the help!

    #9085
    Jason Bobich
    Keymaster

    First I just wanted to mention that on your site, it looks like you’re doing a lot of customization, but you’re not using a Child theme. I would strongly suggest consolidating all of your customizations to a Child theme. With the way you’re doing it now, you’re sort of locking yourself into never being able to update the theme, and you’re already using a version that is about a year old now.

    Child theme intro video: https://vimeo.com/41331677

    Developer docs: http://dev.themeblvd.com

    You’re saying I should create a second slider for the French side, but how do I ensure that the French slider only shows on the French side? Where is this assignment made?

    A slider is something that you place into your content, and your content is determined by WPML. So, for example, if you had a standard page, the English version of the page would have the English slider in its content and the French slider in the French version of the page.

    I’m trying to look at your homepage to see how exactly you’ve set things up to give you a more specific answer, but it appears you’ve deleted WP’s body_class() from header.php’s opening <body> tag for some reason; so it’s difficult to tell.

    In general, one of the big ideas behind the WPML Bridge plugin is that you can setup two different layouts for your homepage, one for each language.

    See here: http://wpml.themeblvd.com/documentation/custom-homepage-layouts/

    So, in each layout, you’d choose the appropriate slider for that language. Make sense?

    As a side note….where would I disable sanitization on the sliders? The changes I make don’t seem to disable it?

    From your theme’s functions.php —

    function my_sanitize_textarea( $input ) {
    	// ... do nothing
    	return $input;
    }
    remove_filter( 'of_sanitize_textarea', 'of_sanitize_textarea' );
    add_filter( 'of_sanitize_textarea', 'my_sanitize_textarea' );

    Also where do I remove the quotes “that the slider text is wrapped in”?

    Apologies, but I don’t know what you mean by this.

    #9089
    dschragg
    Member

    First let me just say, I’m blown away by the level of support you offer. I’ve dealt with tons of other devs, and themes in the past but you take it to a whole new level, for that you’re awesome!

    Second, I should have mentioned that the link I provided was an old version in the development cycle. I’ve since taken my work offline so that I could finish up. So to clear up a few things….yes the version of your template on that link is very old, WPML is also an much older version, and yes I hacked the shit out of your template!

    Since picking up development again I have moved everything to a child theme, and I’m using the latest version of everything, WPML, Swagger, and WP. Hope this clears up a few issues!

    As for the home page, this was done using the Builder, I created template with the slider and a call to action, the rest is loaded from the current page. So the slider is incorporated by the Builder template.

    However, I think I get what you’re saying….if I create two templates using builder, one loads eng. slider, the other french, and then just tell each page to use a different builder template…correct?

    Thank you for the hint on sanitization…I was looking in the wrong place…

    As for the quotes, I was referring to the code, the description of the slider would always have quotes “Slider Description” in the code after the span tags, but it’s gone now, so not a problem anymore….?

    Thanks again for all your help, if I have any more issues I’ll let you know!

    #9090
    Jason Bobich
    Keymaster

    However, I think I get what you’re saying….if I create two templates using builder, one loads eng. slider, the other french, and then just tell each page to use a different builder template…correct?

    Yup, that’s it.

    As for the quotes, I was referring to the code, the description of the slider would always have quotes “Slider Description” in the code after the span tags, but it’s gone now, so not a problem anymore….?

    I’m still not aware of what you’re referring to, but oh well, it’s gone; so I guess you got it figured out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The forum ‘Swagger Responsive WordPress Theme’ is closed to new topics and replies.