Quantcast
Channel: polylang – WordPress.org Forums
Viewing all 11471 articles
Browse latest View live

edouardcoleman on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

$
0
0

I ve been using this code for the slider on the frontpage:
http://www.chooseyourtelescope.com/

<?php
$currentlang = get_bloginfo('language');
if($currentlang=="fr-FR"):
?>
<div>Content in French</div>
<?php else: ?>
<div>Content in English (or other language)</div>
<?php endif; ?>
It was suggested by ChowKaiDeng here:
https://wordpress.org/support/topic/plugin-polylang-how-to-translateswitch-specific-contents-on-templates?replies=17

But now it s not working anymore, it stays in english. I tried to deactivate the other plugins and to restore the previous theme version but nothing changed.

(BTW my site is responsive and the slider is not displaying under 800px width. So for example you can't see the problem on mobile.)

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

https://wordpress.org/plugins/smart-slider-3/


Tara on "PHP content does not switch anymore (Polylang)"

erichie on "[Plugin: Lingotek Translation] string groups and strings missing that polylang theme strings locates"

$
0
0

Are you seeing any Strings at all?

nextendweb_ramona on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

$
0
0

Hi @edouardcoleman

Have you managed to resolve the problem? When I switch to French in your site, I can see the slider and the other content in French: http://imgur.com/a/2BEo5
while when checking your page in English, everything displays in English: http://imgur.com/a/is6G8

ccggint on "[Plugin: Yoast SEO] Unable to noindex page in multilingual website"

$
0
0

Hi,

I have a multilingual website(2 languages) and I tried to noindex a page. With Polylang there are two versions of the page - one for each language. So I observe that only one version can be in noidex state at the same time. I need to noindex both versions (both languages) as when I set the second version in noindex state, the first one came back to 'Default for post type, currently: index'.

What happening? Is it a bug?

Thanks

https://wordpress.org/plugins/wordpress-seo/

Michiel64 on "[Plugin: Polylang] Translation problem Sydney Theme (Athemes)"

$
0
0

Hi,

In order to get two languagues on my site I installed Polylang (not the Pro version).

Some pages work, but other don’t.

The first problem I would like to adress is that the Home page won’t schwitch to between the Dutch and English translation.
I created two pages (see images here https://goo.gl/photos/bgAmf17aJgsqa2qq6
I also created two menu’s.

But it doesn’t work.

This is the Dutch page
http://www.campiade.nl
And this is the English one:
http://www.campiade.nl/en/home-gb/

Can you help me? Thanks?

Michiel

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

edouardcoleman on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

$
0
0

Yes and no..

I couldn t resolve it only with php so I did it with css:

I put both english and french sliders php codes in "header.php" (inside div tags, both with their own class), and "display:none" the slider I don't want for each frontpage in my CSS stylesheet:

.page-id-94 .smartslider-en {
     display:none;
}

.page-id-7386 .smartslider-fr {
     display:none;
}

So I still don't understand why it stopped working with php only..

edouardcoleman on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

$
0
0

By the way I found yesterday that it has nothing to do with Smart Slider as I tried to replace sliders php code with other contents and it still didn't work..


nextendweb_ramona on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

$
0
0

@edouardcoleman

If you write out the content of your $currentlang variable like this:
var_dump($currentlang);
what is the value? Maybe the problem is that for some reason, the variable does not contain the proper value.

If you wouldn't see the result of the var_dump at all, then it can be that for some reason these PHP codes are not running in your site. Would you like me to take a look at that? Please drop me an email to support@nextendweb.com and please refer to this topic!

edouardcoleman on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

nextendweb_ramona on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

$
0
0

@edouardcoleman

It looks like we've replied at the same time :)

I'm pretty sure that the PHP code fails at some point although right now I'm not sure about which point is that. Maybe for some reason the place where you have placed your PHP code is not rendered as PHP but as HTML?

Because I pasted the exact code to my test theme and the only thing displayed was
Content in English (or other language)
since my site language is English. I just saw you sent an email, I'll check it out right away.

Jim True on "[Plugin: Pods - Custom Content Types and Fields] Pods.io integration with Polylang"

$
0
0

You actually brought this over to our Slack #support channel. We helped you directly with a filter to modify how the translation works. Pods Templates weren't being included in the 'translation' matrix because they're internal to Pods.

gonzalogg on "[Plugin: Pods - Custom Content Types and Fields] Pods.io integration with Polylang"

$
0
0

Yes, first i posted here (and here) and then i login into support channel.

For the record, i added this code to functions.php:

// Agrega Polylang a Pods Admin > Templates para traducir plantillas de Pods
// Pods - Custom Content Types and Fields Versión 2.6.7
// Polylang Versión 2.0.3
// Pods Templates not automatically handling Translations for PolyLang https://github.com/pods-framework/pods/issues/3741

add_filter( 'pll_get_post_types', 'my_i18n_post_types', 10, 2 );
function my_i18n_post_types( $post_types, $is_settings ) {
    if ( $is_settings ) {

        // Add this post type to possible i18n enabled post-types (polylang settings)
        $post_types['_pods_template'] = '_pods_template';
    } else {

        // Force enable this post type
        $post_types['_pods_template'] = '_pods_template';
    }
    return $post_types;
}

Thanks!

BestLecture on "[Plugin: Polylang] PHP content does not switch to other language anymore"

$
0
0

Same issue on my end.

Yesterday I upgraded to WordPress 4.6 and to Polylang 2.0.3 and since then the "get_bloginfo('language')" function doesn't work.

Jim True on "[Plugin: Pods - Custom Content Types and Fields] Pods.io integration with Polylang"


lalou24 on "[Theme: Pinnacle] Homepage links according to language"

$
0
0

Hi there,

I'am builing a bilingual FR/EN website with pinnacle free theme version.
Using polylang plug-in for the string translations and everything works well, except for the homepage functionnalities (home slider, icons and call to action):
Problem is : in the home page settings, I cannot attribute different links to the slider pages, icon menu or to the call to action button, so they would send the visitor to the right page according to the language they have chosen.
This is a big issue because it means a client can be on the english homepage but the slider image or the call to action will only redirect him to either english or french as I can only attribute one page link, and that doesn't really look multilingual...!

--> So is there any way to add a language differenciation in the homepage main functionnalities (slider, icon menu and call to action button)? Is that something that is offered in the premium version?

Many thanks in advance for your help !

lalou24 on "[Theme: Pinnacle] Homepage links according to language"

$
0
0

Just found the solution now while have spent hours searching before posting on the forum, it's in the strings transmations and I hadn't seen it!!! :S

BestLecture on "[Plugin: Polylang] PHP content does not switch to other language anymore"

$
0
0

OK, this method just worked for me:

<?php if(get_locale() == 'fr_FR') : ?>

edouardcoleman on "[Plugin: Polylang] PHP content does not switch to other language anymore"

$
0
0

It works perfectly, thanks a lot!

edouardcoleman on "[Plugin: Smart Slider 3] PHP content does not switch to other language anymore (Polylang)"

Viewing all 11471 articles
Browse latest View live




Latest Images