Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #45815

    Hi I use the plugin polylang which works great translating all the sides but I cannot translate the main homepage, it seems like the slide and the featured content only supports one language. I have not upgraded to Kathmandu pro because I need to know it will be possible for me to change language on my first page.

    Kind regards Helena
    http://temp.sundmans.se/sv/

    #45836
    Sakin
    Keymaster

    @helenafjellgren: Sorry we don’t know much about Polylang but Catch Kathmandu Pro is compatible with WPML plugin. See this http://wpml.org/theme/catch-kathmandu-pro/

    #47295
    stijnh
    Member

    @sakin: Catch Kathmandu Pro + WPML is probably a solution, but not a cheap one as you need to buy a License for both the Catch Kathmandu theme AND the WMPL plugin.

    @helenafjellgren: I found what the problem was, but the problem situates in the php code of the Catch Kathmandu theme. The code is valid, but not compatible with the polylang plugin. You can easily create a workaround though.

    When you are using posts in the slider header, Catch Kathmandu will call the following function to generate the slider:

    catchkathmandu_post_sliders()

    That function will generate a slider based on the post that you have configured in Theme options. It even uses the correct translated version of the post. However, after the slider is generated, it is cached in WordPress for 24 hours. Therefore, when you switch language, or another visitor arrives at your site in another language, the post will still be in the language of the original request.

    The simpliest solution would be to disable caching for this slider.

    The answer for that is in the first line of this function, which is commented:
    //delete_transient( ‘catchkathmandu_post_sliders’ );

    change this to
    delete_transient( ‘catchkathmandu_post_sliders’ );

    and the cache will be removed when the function starts execution.

    Of course, it is better to create a child theme, and copy the original function into the functions.php, and make your modifications there. That way, if the Catch Kathmandu theme is updated, your modifications won’t be lost.

    This is a quick solution with minimal changes, but it does disables the caching for the slider, and you could lose performance.

    #47298
    stijnh
    Member

    forgot: the original catchkathmandu_post_sliders() is in wp-content/themes/catch-kathmandu/inc/catchkathmandu-functions.php

    #47327
    Sakin
    Keymaster

    @stijnh: Yes, for this I recommend you to build child theme and then modify the functions. I will never recommend you to edit/add any files inside core theme directory.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Does catch kathmandu support multilingual?’ is closed to new replies.