grappler / polylang-slug

A unique post slug within the language in Polylang. This allows for a page to have same/identical slug in multiple languages.
268 stars 84 forks source link

Automatic same slug for multiple languages in Polylang #24

Closed Nacionarte closed 7 years ago

Nacionarte commented 8 years ago

HI,

Congratulations! It really works allowing the different languages to display same slug;

It is possible to do that automatically by using polylang + lingotek + Polylang Slug?

Currently I'm able to change by hand the slugs ( like en/news, es/news-1 to en/news, es/news) or autosync content but slugs are "serialized";

Let me know if the settings or any other information would be relevant.

Thanks

grappler commented 8 years ago

You mean run an updater on the existing slugs after "Polylang Slug" is activated?

I have not used lingotek before.

Nacionarte commented 8 years ago

Yes,

That way it is possible to create wp polylang multilingual setups in two steps, while maintaining coherence between content using same slugs for different languages.

Lingotek allows you to create the original post (let's say english one) polylang powered, and output all the other languages versions automatically.

The content created like this (without translating) maintain the original language (slugs) with the "1, -2, -3... at the end of the slugs....

Run an updater after the content is created would be great;

·

grappler commented 8 years ago

Why do you not activate "Polylang Slug" before you run Lingotek? That way you would not have trouble with the slugs. If the slugs are not being set correctly then that would be a bug somewhere.

Nacionarte commented 8 years ago

I did but does not work.

I understand that lingotek do their part on remote server and send back the information, should be Polylang Slug hooking up this process ?

I did couple of test with same result (slugs numbered in different languages) and the only thing that appears on debug.log is: [29-Feb-2016 18:24:51 UTC] PHP Notice: Undefined variable: arr in /home/domain/public_html/web1/wp-content/plugins/lingotek-translation/include/group-post.php on line 258

grappler commented 8 years ago

I would raise the issue with Lingotek. It should be easier for them to find the issue as they know their codebase. The code for checking if the slug should be unique is 53 lines of code which the developers of Lingotek should easily be able to understand. https://github.com/grappler/polylang-slug/blob/master/polylang-slug.php#L60-L113

I am happy to help the Lingotek developers if they need to some changes.

Nacionarte commented 8 years ago

I will check with them, thank you, Keep up the good job grappler.

grappler commented 8 years ago

@Nacionarte Did you get any feedback from Lingotek?

Nacionarte commented 8 years ago

It seems they are interested https://wordpress.org/support/topic/lingotek-slug-synchronisation?replies=2#post-8128037 (of course)…

🙂

On 18 Mar 2016, at 08:41, Ulrich Pogson notifications@github.com wrote:

@Nacionarte https://github.com/Nacionarte Did you get any feedback from Lingotek?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/grappler/polylang-slug/issues/24#issuecomment-198241236

grappler commented 8 years ago

@Nacionarte Do you know if they got a fix out?

Nacionarte commented 8 years ago

Sadly not …

😐

On 01 Jun 2016, at 17:45, Ulrich Pogson notifications@github.com wrote:

@Nacionarte https://github.com/Nacionarte Do you know if they got a fix out?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/grappler/polylang-slug/issues/24#issuecomment-223035243, or mute the thread https://github.com/notifications/unsubscribe/AQtUCZ29rEt8LdZ9J5r6USreGMvgB_Tqks5qHakGgaJpZM4HknoR.

grappler commented 7 years ago

@Nacionarte It seems it got fixed now https://wordpress.org/support/topic/lingotek-slug-synchronisation/#post-7143311