Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #19411

    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!
    Ronald

    #19415
    Sakin
    Keymaster

    @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/

    #19422

    Hi 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!
    Ronald

    #19424
    Sakin
    Keymaster

    @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 function function catcheverest_homepage_headline() and remove // from //delete_transient( 'catcheverest_homepage_headline' );
    Then copy the function function 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.

    #19468

    Hi 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!
    Ronald

    #19475
    Sakin
    Keymaster

    @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.

    #19476

    I have posted the question on their forum as well. If I manage to get it working I’ll post the solution here.

    Thanks!

    #19477
    Sakin
    Keymaster

    @Ronald de Hommel: That will be great. Thanks a lot.

    #19820

    Hi 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!

    #19831
    Sakin
    Keymaster

    @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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Multi Language’ is closed to new replies.