Home › Forums › SKT Full Width Forum › Polylang and Home Page
- This topic has 13 replies, 2 voices, and was last updated 9 years, 1 month ago by rene sheir.
-
AuthorPosts
-
October 11, 2015 at 9:04 pm #12511
Greetings,
I am using Polylang plugin to build English and French. The progress is going relatively well for all pages except for the Home page. I do not understand how to edit the Home page in one language so that it only shows the edit on that language’s home page eg.: Fr [mysite.com/index.php/fr/] and En [mysite.com/index.php/en/]. I have two sections and a footer. In Section 1, there is text on the slider images, including the contact us button. in Section 2, I have the “accordion” menu. Then the footer. I have tried a few different things, but whenever I edit any content on the home page it is reflected the same way on both En and Fr.
Just going around in circle Please help – Thank you,
October 12, 2015 at 6:30 am #12517Hi,
Kindly use qTranslate X plugin. The use of this plugin and how to do multilingual for homepage has been explained here: http://sktthemesdemo.net/documentation/bony-doc/
Click on Multilingual tab on the above link.
The rest pages/posts etc automatically show different language tabs for ease of use.
Regards,
ShriOctober 12, 2015 at 2:41 pm #12545Hi,
Not such a practical solution considering the only thing left for me to translate is the Home page……
October 13, 2015 at 11:01 am #12582Kindly use this function:
function polylang_shortcode($atts, $content = null){ if (empty($content)) return ''; extract( shortcode_atts( array('lang' => ''), $atts ) ); if (empty($lang)) return "<h3>You must specify 'lang' using shortcode: polylang</h3>"; return ($lang == pll_current_language()) ? $content : ''; } add_shortcode('polylang', 'polylang_shortcode');
October 13, 2015 at 11:03 am #12583And then go to the theme options area of homepage and slider and use this:
[polylang lang=”en”]English[/polylang][polylang lang=”es”]Spanish[/polylang]
Languages i used are for example use your actual language codes and languages.
Regards,
ShriOctober 13, 2015 at 4:11 pm #12604Thanks Shri,
I am assuming I use the Editor to input the text but with page/template do I apply it to?
Thanks again
October 14, 2015 at 8:07 am #12631Hi,
Kindly paste this at very end of functions.php
Regards,
ShriOctober 18, 2015 at 9:58 pm #12857I’m still having difficulty with this:
I pasted in functions.php exactly the code section that you provided in your reply to my post #12582.
Then in the slider image 1, used exactly the following code:
[polylang lang=”en”]SERVICES OFFERED IN CANADA AND GLOBALLY[/polylang][polylang lang=”fr”]SERVICES OFFERTS AU CANADA ET MONDIALEMENT[/polylang]
On the front end for slider image 1 the code line above comes as text exactly as is, i.e the function is not executed, it just shows as text.
In both cases I have saved/updated the changes and of course refreshed the front end to test.
What I am doing wrong (my languages are En/Fr)
Thank you
October 19, 2015 at 1:46 pm #12912Not sure if the function even works.
Send us the url of the site and WordPress admin details via email: [email protected]
qTranslate works out of the box with our themes but i understand that you want to use Polylang.
Regards,
ShriOctober 26, 2015 at 8:13 pm #13268Shri,
I sent you on Octy 19 the admin details as requested. I am not very pleased with your service. First you give me a code, I follow your instruction and it does not work, then you tell me your not sure if the function even works; If so why would you provide something that might not work. You indicate that qTranslate works out of the box, however I have completely finished (as mentioned before) the site and only need to use the translating function for the home page.
Please action
October 27, 2015 at 9:21 am #13299Sent back reply to your email.
Regards,
ShriOctober 30, 2015 at 1:42 am #13489Resent admin details as requested.
And received email that programers were working on issue, never received problem fix email or further correspondence with instruction. Saw on the site that site titled had been changed on home page slider also saw that this code had been added to first home page slider dialogue box:
<span lang=”en-US”>SERVICES OFFERED IN CANADA AND GLOBALLY</span> – <span lang=”fr-FR”>SERVICES OFFERTS AU CANADA ET MONDIALEMENT</span>
Where the Capital text is my content. However the code still does not work.
I have wasted a tremendous amount of time with this issue and still it does not work.
Please address and fix.
Not happy…
October 30, 2015 at 5:56 am #13495Really sorry for this. We tried to contact plugin developer he said only if you include php translations which he suggests which doesn’t work with any other plugin nor the core WordPress translation functions then it would be possible.
In latest 2 versions of his plugin he even stopped use of any shortcodes.
We tried all possible solutions. Since your site isn’t that big enough can you not use qTranslate X? It works out of the box and doesn’t require any coding changes as well.
Regards,
ShriOctober 31, 2015 at 12:00 am #13557k will do thks
-
AuthorPosts
- You must be logged in to reply to this topic.