How to translate the Homepage using Polylang
-
Hi,
I am using the latest version of WP with the Full Frame Pro theme 2.3. I have installed Polylang and created multiple pages in a two language setup.
My problem now is the homepage, which is defined by the theme.
I would like to know how I can have my custom text on my front homepage bilingual as well.
All the other pages work fine.Thank you
-
Hi
Does your Homepage is managed in your Theme Options?
Yes everything on my homepage is managed trough Appearance / Customize / Theme Options / Promotion Headline Options
In there I want to have the Promotion Headline Text, the Promotion Subheadline Text and the Promotion headline Butten Text in a second language.
You need to create a wpml-config.xml file to handle the translation.
CatchThemes provides for some of their themes a ready wpml-config.xml file.
See with them if this file has been already created for your theme.I found a file for an other theme and modified it to mine (Full Frame Pro). After that I implemented it in the child folder.
The way I have it now does not work, I get a white screen. I think it is the php function,
Below is the functions.php code and the wpml-confic.xml code.
Any help would be very appreciated.
Thanks<?php /** * Child Theme functions and definitions * */ /** * Loading Parent theme stylesheet * */ add_action( 'wp_enqueue_scripts', 'fullframe_child_enqueue_styles' ); function fullframe_child_enqueue_styles() { wp_enqueue_style( 'fullframe-parent-style', get_template_directory_uri() . '/style.css' ); } /** * Template for Clearing WPML Invalid Cache * * To override this in a child theme * simply create your own fullframe_wpml_invalidcache(), and that function will be used instead. * * @since Full Frame */ function fullframe_wpml_invalidcache() { delete_transient( ‘fullframe_featured_content' ); } // fullframe_wpml_invalidcache /* endif; */ add_action( 'after_setup_theme', ‘fullframe_wpml_invalidcache' );:
and this is the wpml-config.xml code:
<wpml-config> <admin-texts> <key name=“fullframe_options"> <key name="featured_header_image_alt"/> <key name="featured_header_image_url"/> <key name="search_text"/> <key name="excerpt_more_text"/> <key name="footer_left_content"/> <key name="footer_right_content"/> <key name="promotion_headline"/> <key name="promotion_subheadline"/> <key name="promotion_headline_button"/> <key name="promotion_headline_url"/> <key name="featured_content_headline"/> <key name="featured_content_subheadline"/> <key name="featured_content_link_1"/> <key name="featured_content_link_2"/> <key name="featured_content_link_3"/> <key name="featured_content_link_4"/> <key name="featured_content_link_5"/> <key name="featured_content_link_6"/> <key name="featured_content_link_7"/> <key name="featured_content_link_8"/> <key name="featured_content_link_9"/> <key name="featured_content_link_10"/> <key name="featured_content_title_1"/> <key name="featured_content_title_2"/> <key name="featured_content_title_3"/> <key name="featured_content_title_4"/> <key name="featured_content_title_5"/> <key name="featured_content_title_6"/> <key name="featured_content_title_7"/> <key name="featured_content_title_8"/> <key name="featured_content_title_9"/> <key name="featured_content_title_10"/> <key name="featured_content_content_1"/> <key name="featured_content_content_2"/> <key name="featured_content_content_3"/> <key name="featured_content_content_4"/> <key name="featured_content_content_5"/> <key name="featured_content_content_6"/> <key name="featured_content_content_7"/> <key name="featured_content_content_8"/> <key name="featured_content_content_9"/> <key name="featured_content_content_10"/> <key name="featured_link_1"/> <key name="featured_link_2"/> <key name="featured_link_3"/> <key name="featured_link_4"/> <key name="featured_link_5"/> <key name="featured_link_6"/> <key name="featured_link_7"/> <key name="featured_link_8"/> <key name="featured_link_9"/> <key name="featured_link_10"/> <key name="featured_title_1"/> <key name="featured_title_2"/> <key name="featured_title_3"/> <key name="featured_title_4"/> <key name="featured_title_5"/> <key name="featured_title_6"/> <key name="featured_title_7"/> <key name="featured_title_8"/> <key name="featured_title_9"/> <key name="featured_title_10"/> <key name="featured_content_1"/> <key name="featured_content_2"/> <key name="featured_content_3"/> <key name="featured_content_4"/> <key name="featured_content_5"/> <key name="featured_content_6"/> <key name="featured_content_7"/> <key name="featured_content_8"/> <key name="featured_content_9"/> <key name="featured_content_10"/> </key> </admin-texts> </wpml-config>
After that I implemented it in the child folder.
Upload it in /wp-content/polylang/ (create the directory if it does not exist).
Hi,I do have the same issue.
Uploaded the xml file to the said folder.Doesn’t work.Do you use a child theme?
Yes I do.
Currently i have wpml-config.xml inside wp-contents/polylang/Have a child theme for my Full Frame theme and activated the child theme.
Is that the right way to be followed?I found a topic on the catch theme support that prescribe to use another wpm-config.xml.
See the discussion: https://catchthemes.com/support-forum/topic/polylang-translating-featured-content-title-and-description/
See the right wpml-config.xml: https://gist.github.com/sakinshrestha/6cc4ba393ade041c16ae#file-wpml-config-xml
Does it work for you?
Thanks for your immediate reply ..
Yeah, ihave already gone through the articles.
Still negative…Yes you are right. The wpml-config.xml it’s not the problem.
Could you deactivate you Child theme and test your theme + Polylang?Does it work?
Yeah i have tried with polylang+theme.
Still negative.
Regarding the xml attrbute<key name=“fullframe_options”>
where do i get this “name” from??
I’m using Full Frame free version.Need to check whether this name differs or not for this version and FullFrame Pro Version?@av4ajay
Please, could you open a new topic, since you use the Full Frame free version. Please precise which version of this theme you use.
In the meantime I will test it to see what’s wrong.OK Fyn…Kindly post your inference once you are done with your test.
My FullFrame Version was 1.6Please open a new topic and give a link to your theme since the last version for Full Frame Version is *1.7.* and not 3.
- The topic ‘How to translate the Homepage using Polylang’ is closed to new replies.