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

filip.jnc on "[Plugin: Polylang] Poylang: language independent categories (pll_get_taxonomies)"

$
0
0

I want to achieve a similar thing to that. For me it's not only posts/categories but also custom posts/categories and events manager events/event categories. And more specifically, I want to be able to see the posts/custom posts/events regardless of the language chosen. In my case, pressing on one category redirects me to the default language.

So I thought, and even opened a topic, what if Polylang let us assign posts to its default category + its counter-language category (that is now hidden).

What do you think?


brocheafoin on "[Plugin: Polylang] Language Order"

$
0
0

In the language list on the right, when you hover over a language, you will see an "Edit" link. Click this and you'll be able to change the order and save your changes, without adding a language.

filip.jnc on "[Plugin: Polylang] Untranslated taxonomies/custom taxonomies"

$
0
0

PS. The code for my custom language switcher at the bottom of the page:

<?php
if( class_exists('Polylang') && function_exists('pll_the_languages') ) {

$pll_args = array('show_names'=>0,'show_flags'=>1,'hide_if_empty'=>0,'hide_current'=>1,'raw'=>1);
$pll_otherlang_array = pll_the_languages($pll_args);
$pll_otherlang_details = $pll_otherlang_array[0];
$pll_url = $pll_otherlang_details['url'];
$pll_flag = $pll_otherlang_details['flag'];
?>
<div class="mk-polylang-switcher">
		<a href="<?php echo $pll_url ?>" class="mk-polylang-switcher-link"><?php echo $pll_flag ?></a>
</div>
<?php } ?>

filip.jnc on "[Plugin: Polylang] Untranslated taxonomies/custom taxonomies"

$
0
0

I've just noticed that if I add ?lang=ru at the end of the URL of each post or custom-post, the post is still displayed in the Romanian (default) and the rest is in Russian (even though the post in not translated). This is close to what I want if the post is not translated.

Demo:
http://bikeportal.md/results-2013-1/
http://bikeportal.md/results-2013-1/?lang=ru

However, this doesn't work with categories and other taxonomies + the switcher still wants to redirect me to the homepage (doesn't add ?lang=ru in the href).
__________________________
This still has little-to-nothing to do with my main problem: the translated categories and other taxonomies are empty because I can't assign untranslated posts to them.

Demo:
http://bikeportal.md/category/results/
http://bikeportal.md/category/results-ru/
-> As you can see, the second one is a translated category of posts and it's empty -> thus the language switcher from default language sees it and doesn't add the correct URL to the Russian category.

Any suggestions, tips, codes, idea would be very appreciated! I really don't want to switch to that heavy WPML...

Chouby on "[Plugin: Polylang] Different default language for admin"

$
0
0

So you will have to make a custom plugin with something like:

add_filter('pll_admin_preferred_language', 'my_preferred_language');
function my_preferred_language($lang) {
  global $polylang;
  return $polylang->model->get_language('fr');
}

Chouby on "[Plugin: Polylang] Loosing cookies switching from a domain to another (Logged in)"

$
0
0

If i de-active Polylang the english domain has no reason to exist, since it is set in the settings of Polylang.

Polylang does not create the domain. It should be assigned to your WordPress directory on server side whatever Polylang is activated or not. Polylang does just associate the existing domain with a language.

There is a solution to transfer the cookies from one domain to another?

There should be such possibility but that's not that easy as it may lead to security issues.

filip.jnc on "Polylang and Events Manager"

$
0
0

I mark this as resolved because it might be helpful for pro users.

pierrestoffe on "[Plugin: Polylang] Different default language for admin"

$
0
0

Thanks a lot! Exactly what I needed.

Have a nice w-e,
Pierre


mariajcrgomes on "[Plugin: Polylang] Translate homepage Arcade theme URGENT"

$
0
0

Hi,

Can anyone help me? I'm using the theme Arcade from bavotasan.com, and I didn't had any problem translating everything with Polylang plugin in this theme, except for the homepage.

How do I translate the Jumbo Headline, the "see more" botton and "from the blog"?

This is urgent, I'm delaying a lot of things just because of this problem. Someone give me a solution.

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

mariajcrgomes on "[Theme: Arcade Basic] Translate homepage Arcade theme"

$
0
0

Hi,

Can anyone help me? I'm using the theme Arcade from bavotasan.com, and I didn't had any problem translating everything with Polylang plugin in this theme, except for the homepage.

How do I translate the Jumbo Headline, the "see more" botton and "from the blog"?

This is urgent, I'm delaying a lot of things just because of this problem. Someone give me a solution.

mirilailai on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

Hi,
Nice solution ronshe but I'm new in this multilingual functions so could you please explain where to add this shortcode script you wrote so I can use the shortcodes later?

Thank you.

ronshe on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

Hi mirilailai,

Look at Chouby's answers.
The need in the shortcode is not recommended and very rarely needed.
Be sure that you MUST use it.

Ronny

mirilailai on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

Yeah I did but it looks very complicated. I have no idea how to pull these strings. I'm trying to translate a theme custom field which is in the Theme Options.

filip.jnc on "[Plugin: Polylang] Untranslated taxonomies/custom taxonomies"

$
0
0

I changed some bits of code in this plugin to redirect me to ?lang=ru of the same article if no translation is found and query the default article. It's not a permanent fix, but I hope Polylang gets the future of displaying default category lists/posts/whatever if no translation found. Cheers.

mirilailai on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

If my theme is called "spa" and the theme field is called Intro Content, how should I register the string?


ronshe on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

Can the fields accept shortcodes?

mirilailai on "Polylang shortcode (like qTranslate) for theme options and text"

ronshe on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

So put my code in functions.php
Use the shortcode like this:
[polylang lang="en"]English[/polylang][polylang lang="sp"]Spanish[/polylang]

mirilailai on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

I add `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');`

and it pulls me an error: Fatal error: Cannot redeclare polylang_shortcode() (previously declared in /home/meliaspa/www/www/wp-content/plugins/polylang/polylang.php:33) in /home/meliaspa/www/www/wp-content/themes/spa/functions.php on line 11 when I save..

ronshe on "Polylang shortcode (like qTranslate) for theme options and text"

$
0
0

You have the function twice. That's why it tells you Cannot redeclare

Viewing all 11471 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>