- This topic has 9 replies, 2 voices, and was last updated 10 years, 10 months ago by Sakin.
-
AuthorPosts
-
January 17, 2014 at 7:20 pm #19411Ronald de HommelMember
Hi,
I installed the polylang plugin to use more languages on my site. It works fine except for the home page. Since the texts on the homepage are entered through the theme options, where the the multi language option does not show up, I cannot have the homepage in different languages.
Is there a workaround to solve this problem?Thanks!
RonaldJanuary 17, 2014 at 11:50 pm #19415SakinKeymaster@Ronald de Hommel: I am not sure about polylang plugin. Can you ask in their support forum. Our user had similar problem in qTranslate plugin. See this
http://catchthemes.com/support-forum/topic/qtranslate-plugin-in-catch-everest-pro/
http://catchthemes.com/support-forum/topic/qtranslate-and-featured-slider/January 18, 2014 at 8:14 am #19422Ronald de HommelMemberHi Sakin,
Thanks for your reply. Somehow the solution for qTranslate doesn’t seem to apply for Polylang. On their forum I found a solution that seems to work with many plugins and themes:
You have to add a file wpml-config in the root folder of the theme or in a separate Polylang folder in the WP content folder.
The code in the wpml-config file I adapted to include the desired fields I want to translate:<wpml-config>
<admin-texts>
<key name=”catcheverest-theme-options-defaults”>
<key name=”homepage_headline” />
<key name=”homepage_subheadline” />
<key name=”homepage_featured_headline” />
</key>
</admin-texts>
</wpml-config>Still I can’t get it to work. Am I making a mistake in the code? Or am I referring to the wrong file?
Any suggestions?
Thanks a lot!
RonaldJanuary 18, 2014 at 9:46 am #19424SakinKeymaster@Ronald de Hommel: I also don’t know about it as I haven’t worked in this plugin. Next step, can you build child theme
Then copy the functionfunction catcheverest_homepage_headline()
and remove//
from//delete_transient( 'catcheverest_homepage_headline' );
Then copy the functionfunction catcheverest_homepage_featured_content()
and remove//
from//delete_transient( 'catcheverest_homepage_featured_content' );
and check in. As these code remove the cache of your dynamic content.January 20, 2014 at 12:36 am #19468Ronald de HommelMemberHi Sakin,
As I understand it, I have to replace the original code:
function catcheverest_homepage_headline() {
//delete_transient( ‘catcheverest_homepage_headline’ );
with:
function catcheverest_homepage_headline() {
delete_transient( ‘catcheverest_homepage_headline’ );
(Just removing the //)
Is that correct? Is does not seem to change anything.The idea of the wpml file is to create 4 String fields in the polylang plugin settings page where I can fill in the homepage headline and featured content texts.
These new strings don’t show up unfortunately.Thanks!
RonaldJanuary 20, 2014 at 8:32 am #19475SakinKeymaster@Ronald de Hommel: Sorry Ronald. You need to contact plugin support form and let me know if we need to change anything. It’s difficult to track all plugins so we support plugin as demanded.
January 20, 2014 at 9:10 am #19476Ronald de HommelMemberI have posted the question on their forum as well. If I manage to get it working I’ll post the solution here.
Thanks!
January 20, 2014 at 9:13 am #19477January 31, 2014 at 8:24 am #19820Ronald de HommelMemberHi Sakin,
I figured out what I did wrong in the wpml-config.xml file. It has to be like this:
<wpml-config>
<admin-texts>
<key name=’catcheverest_options’>
<key name=’homepage_headline’ />
<key name=’homepage_subheadline’ />
<key name=’homepage_featured_headline’ />
</key>
</admin-texts>
</wpml-config>It works, the strings show up in the translation plugin. But When I change language, the text in the homepage_subheadline field doesn’t always change to the new language. sometimes it does. i can’t find a logic.
So I changed the “function catcheverest_homepage_headline()” as you suggested before. That solves the problem, but creates a new one.
Now the images in the featured content section on the homepage disappear and and links are changed into: http://www.coffee-imports.com/Copy/The%20Coffee%20Quest%20sites/Los%20Nevados%20Coffee-Imports/Site%20backup%20before%20install/Theme/catch-everest/inc/http:/www.coffee-imports.com/nl/finca-san-carlos-salgar-lot-4/
As you can see this is a text from backend about making a backup. At the end is the correct link. So the text: Copy/The%20Coffee%20Quest%20sites/Los%20Nevados%20Coffee-Imports/Site%20backup%20before%20install/Theme/catch-everest/inc/ is pasted in between, and of course the link doesn’t work anymore.You know what is going wrong?
Thanks!January 31, 2014 at 2:39 pm #19831SakinKeymaster@Ronald de Hommel: Can you post your code in https://gist.github.com/ and send me the link of your code. Then I can check in.
-
AuthorPosts
- The topic ‘Multi Language’ is closed to new replies.