• 7741globe

    (@7741globe)


    Hi folks,

    I’ve been trying out Polylang since today. Until now, it’s worked out really well for me (compliments for the developers), but I’ve got one thing that’s bothering me.
    I’m currently working on a new design for my website O-W Hosting.
    On the frontpage, I can configure an image and text next to it, but this text, which has to be configured in the theme-settings, won’t translate with Polylang. Normal of course, as it’s not a part of the page content, but is there some way I can have Polylang translate this as well?
    If necessary, the link to the website is http://testsite.o-whosting.net
    I read something about adding PHP-codes to the page, but I’m not really a star when it comes to codewriting…

    Thanks in advance for helping me out!
    /7741globe

    https://wordpress.org/plugins/polylang/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Chouby

    (@chouby)

    Yes it should be possible. You have to find the option(s) in which these texts are stored and then create a wpml-config.xml file.

    Thread Starter 7741globe

    (@7741globe)

    When I tried to look for the wp-config.xml file, which was in the mothertheme, it already showed this:

    <wpml-config>
    	<custom-types>
    		<custom-type translate="1">slider</custom-type>
    		<custom-type translate="1">portfolio</custom-type>
    		<custom-type translate="1">testi</custom-type>
    		<custom-type translate="1">services</custom-type>
    		<custom-type translate="1">faq</custom-type>
    		<custom-type translate="1">team</custom-type>
    	</custom-types>
    	<taxonomies>
    		<taxonomy translate="1">portfolio_category</taxonomy>
    		<taxonomy translate="1">portfolio_tag</taxonomy>
    	</taxonomies>
    </wpml-config>

    However, this is not included in the lines I can translate within Polylang (which are only the dateformats and the (sub)title).
    Should this file be put somewhere else? Because I doubt, if I add the lines for my front-page, that it will work, because these lines don’t work either….

    Plugin Author Chouby

    (@chouby)

    If your theme already has a wpml-config.xml file, you should ask the theme author to help you. Here it defines post types and taxonomies that Polylang/WPML should manage. But there is nothing for translating theme options. These are in admin-texts tags (as shown in the link I provided above).

    Thread Starter 7741globe

    (@7741globe)

    Right. I’ll take a look at it again and let you know about the results asap. Thanks for the help so far!

    Thread Starter 7741globe

    (@7741globe)

    I looked up the strings, and placed this wpml-config.xml file in the folder of the mothertheme, the childtheme and made a folder in wp-content with the name “polylang”, still nothing appears in my Polylang dashboard…

    <wpml-config>
    	<custom-types>
    		<custom-type translate="1">slider</custom-type>
    		<custom-type translate="1">portfolio</custom-type>
    		<custom-type translate="1">testi</custom-type>
    		<custom-type translate="1">services</custom-type>
    		<custom-type translate="1">faq</custom-type>
    		<custom-type translate="1">team</custom-type>
    	</custom-types>
    	<taxonomies>
    		<taxonomy translate="1">portfolio_category</taxonomy>
    		<taxonomy translate="1">portfolio_tag</taxonomy>
    	</taxonomies>
    	<admin-texts>
            <key name="header-info_title" />
            <key name="header_info_slogan" />
            <key name="header_info_button_txt_1" />
            <key name="header_info_button_txt_2" />
    	</admin-texts>
    </wpml-config>

    Plugin Author Chouby

    (@chouby)

    Probably the option name is lacking

    Thread Starter 7741globe

    (@7741globe)

    That should be
    <key name="[theme-name]">
    above the other keynames in my case?

    Plugin Author Chouby

    (@chouby)

    Yes and you should close with </key> below. Somethig like this:

    <wpml-config>
    	<admin-texts>
    		<key name='theme_option_name'>
    			<key name="header-info_title" />
    			<key name="header_info_slogan" />
    			<key name="header_info_button_txt_1" />
    			<key name="header_info_button_txt_2" />
    		</key>
    	</admin-texts>
    </wpml-config>

    Thread Starter 7741globe

    (@7741globe)

    Still nothing 🙁
    It sucks that I’m this bad at codewriting….

    Thread Starter 7741globe

    (@7741globe)

    I’ll contact TemplateMonster, bought the template there. I’ll let you know about the results.

    Thread Starter 7741globe

    (@7741globe)

    They won’t provide any information on this matter, as it involves 3rd party software…….. Anyone else who has had this kind of thing going on and knows how to solve it?

    Plugin Author Chouby

    (@chouby)

    What a good support 🙁 They claim to be WPML compatible, provide an incomplete wpml-config.xml file and don’t want to help… ?

    Well I guess you will have to find yourself the right option name. Try looking for instruction ‘update_option’.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Text configured by theme's settings not translated – how to do this?’ is closed to new replies.