1. Post name http://tls.lv/sample-post/
2. Didnt changed Default home page- showing posts on each language
3. 3 languages, Menus without lang, Dont check user browser lang, Default lang set, The lang is set from content, dont show /language/ in PP, Allow to sync cats tags.
U can check my page and post i put there so that everyone can post without reg. http://tls.lv/
I tried http://p2reloaded.com/ and that works a bit with polylang. It posts to default lang so if i change it post goes to that lang. So how to make it work allways can maybe found in that code? Heres my example page with that plugin working. http://talantufabrika.lv/
If im in different lang then default i post and it pops up in place i am but on reloud its not there anymore but in default lang i can see it.
Plugin Author
Chouby
(@chouby)
For now Polylang can set the language of a post only from backend. So it means that P2 needs some adaptations. You can include this in a custom plugin:
add_action('save_post', 'pll_p2_save_post', 5);
add_action('create_term', 'pll_p2_save_term', 5);
add_action('edit_term', 'pll_p2_save_term', 5);
function pll_p2_save_post($post_id) {
global $polylang;
if (isset($polylang) && !$polylang->get_post_language($post_id) && isset($_COOKIE['wordpress_polylang']))
$polylang->set_post_language($post_id, $_COOKIE['wordpress_polylang']);
}
function pll_p2_save_term($term_id) {
global $polylang;
if (isset($polylang) && !$polylang->get_term_language($term_id) && isset($_COOKIE['wordpress_polylang']))
$polylang->set_term_language($term_id, $_COOKIE['wordpress_polylang']);
}
This should be a good starting point to make P2 multilingual. However, it won’t solve all the issues. At least, the autocomplete tags form will display tags in all languages.
Where do i put that? Im searching for string ‘save_post’ and only found it in themes\p2\js\p2.js but still there dont know where to change what.