After activating SimpleTagging plugin I faced some problem. To avoid that I disabled the Gengo’s feature `Gengo should append language codes to permalinks automatically.’.
Days later I noticed a WordPress’ strange behavior.
I have pages having translations and when I clicked a link to the another language’s page then I saw a `404 Error’ page.
That’s strange.
Went further investigation I found a bad smelling code in the `locale’ filter.
One of the pair pages I faced 404 error have 3 depth hierarchy.
software/wordpress-plugins/l10n-helper.html <English> software_ja/wordpress-plugins/l10n-helper.html <Japanese>
Before modification the value of $value was set as:
wordpress-plugins/l10n-helper.html <English> wordpress-plugins/l10n-helper.html <Japanese>
$wpdb->posts.post_name only have a post name for 1 depth of hierarchy but the code got of 2 depth. And the code does not seem to care of WordPress feature that it allows to have same post name among pages while the top of ancestors of those page’s are not same.
I fixed the code to obtain the first part of uri.
Oh my God… you have no idea how long I was looking for help connected with this problem that you solved.
Thank you, thank you and one more time thank you!
And by the way maybe you will be able to help me with one more problem connected with gengo.
I have my website in three languages: english, polish and german.
I have “Gengo should append language codes to permalinks automatically.” option on.
And everything is ok, I mean my english version of the website is:
http://www.something.com/en/
Polish version:
http://www.something.com/pl/
German version
http://www.something.com/de/
What I want is to have english version without /en/ at all or at least without /en/ on the first page, so that english version will be http://www.something.com
If somebady will write http://www.something.com it will always open english version. If somebady will write http://www.something.com/pl/ it will open polish wersion and so on.
What do you thing? I hope you understand me.
Regards,
Tino
Hi tino,
I think Gengo already has such option for you.
Look for`When reader visits for the first time:’ and
select `Show posts in ~’ to ‘English’.
Doesn’t it work for you?
No it’s not what I’m looking for. I now that website can start in english but if “Gengo should append language codes to permalinks automatically.” would be on I will have:
http://www.something.com/en/
http://www.something.com/pl/
http://www.something.com/de/
If the option “Gengo should append language codes to permalinks automatically.” would be off I will have:
http://www.something.com/ for every plish, german ang english
An I wont to have:
http://www.something.com/ – this will open only english always
http://www.something.com/pl/
http://www.something.com/de/
Tino
So I want to have pages in English without /en/ at the end but Polish and German should have /pl/ /de/ at the end.
Sorry for my mistakes in previous comment.
Or maybe it is posible to do only one thing. Change option ““Gengo should append language codes to permalinks automatically.” that it will add language codes everywhere besides the main domain. So for http://www.something.com/ there will be no language code. But for every subpage there will be a language code.
This code was not working for me