(2013-07-06, 19:38:02)Carlos Wrote: - tags beginning with underscore (_) are "hidden": they're invisible (under the posts, in the tag cloud), but are searchable (with ?tag= or /tag/ in the URL)That is great, now we can do multilingual sites so that in every lang version of the site will be posts in the desired language only
However, you need to use pretty URLs and custom permalink structure so that every language has a different URL. Then, you rewrite your URL of the page where your posts are being shown to the new one with the tag that differs your posts by language (for example _en, _de, etc.).
If the URL for the page with your posts is in default language (let's say Czech with tags _cz) like this this
Code:
http://(www).domain.com/news/
Code:
http://(www).domain.com/en/news/
This rewrite rule should rewrite your URL to the desired tag. Put it into your htaccess somewhere after "RewriteEngine on". For default language...
Code:
RewriteRule ^news/$ tag/_cz [R=301,QSA,L]
Code:
RewriteRule ^en/news/$ en/tag/_en [R=301,QSA,L]
You have to write a rule for every new language (Rule #2) or it could be "general". The second rule would look like this then:
Code:
RewriteRule ^([^/])/news/$ $1/tag/_$1 [R=301,QSA,L]
I'm not sure if these rules are correct, but I think they are. You can try it. Be careful, R=301 means that it's permanent redirection, that means that it's cached by your browser and you need to clear your cache after every change in the htaccess. You can change it to R=302 or just "R" for a temporary redirection.
I'm just creating a new personal site which is not going to be multilingual as I don't need it at all, but I hope I'll try this redirection soon. It should work if I didn't make any mistake.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
» The little I did for GetSimple