- This topic has 4 replies, 3 voices, and was last updated 9 years, 5 months ago by Sakin.
-
AuthorPosts
-
October 15, 2014 at 7:58 pm #45815helenafjellgrenMember
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/October 15, 2014 at 11:14 pm #45836SakinKeymaster@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/
November 11, 2014 at 12:12 pm #47295stijnhMember@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.
November 11, 2014 at 12:46 pm #47298stijnhMemberforgot: the original catchkathmandu_post_sliders() is in wp-content/themes/catch-kathmandu/inc/catchkathmandu-functions.php
November 12, 2014 at 11:26 am #47327 -
AuthorPosts
- The topic ‘Does catch kathmandu support multilingual?’ is closed to new replies.