Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-01-11 23:01:47
- simsim
- Member
- Registered: 2006-05-06
- Posts: 70
mod_rewrite & section names
Hello,
I have a site that should be introduced in two languages, Arabic & English. Arabic is the primary language so the site’s direct URL goes to the Arabic version. English is the secondary language, so the site’s URL would be:
http://example.com/en/
I’m using clean URLs successfully and without any problems. A typical article is something like:
http://example.com/section/article-title
So, I want the English version of the article to be:
http://example.com/en/section/article-title
The content inside the second article is the same as the firsts, however it would be fully & completely translated in English which would mean they’re technically different so no content duplication is afraid of.
The typical solution would be to install two instances of Textpattern; one for the Arabic site and another for the English one. However, Textpattern already provides me with everything I need to develop a bilingual site using only one database and one installation.
My question is: Is there a way to make benefit of URL rewriting to add an /en/ between the site main URL and the section name to certain articles? This would save me from installing a whole new installation of TXP under a /en/ folder which I see completely useless.
Offline
Re: mod_rewrite & section names
Do you need the “en” in the URL? If not there is this method you could have a look at.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2008-01-11 23:33:27
- simsim
- Member
- Registered: 2006-05-06
- Posts: 70
Re: mod_rewrite & section names
Neat workaround that would work for some sites, but unfortunately I need the en in the URL. It’s a charity organization website so they won’t tolerate giving an impression that a specific language has more importance than another one, I guess.
Thanks anyway. :)
Offline
#4 2008-01-11 23:57:49
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: mod_rewrite & section names
Did you have a look at the MLP Pack?
Offline
#5 2008-01-12 00:12:42
- simsim
- Member
- Registered: 2006-05-06
- Posts: 70
Re: mod_rewrite & section names
Yes I did. IMO, it’s too bloated for my needs. The site depends mostly on static content and there’s only one news section that is dynamic with regular updated content. If I’m to use MLP I guess I would need two installations of TXP which is what I’m trying to avoid since I could then easily install the English site under a physical subdirectory /en/.
I’m already planning on using Steve’s pack on other projects but this one really doesn’t need the complexity of MLP.
Last edited by simsim (2008-01-12 00:14:02)
Offline
#6 2008-01-12 00:19:53
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: mod_rewrite & section names
You don’t need two installations of TXP to use MLP. And the pack can also easily be used for a simple site with just a few translated articles.
But if you don’t want that, you could create separate sections for the english articles and name them ‘en-section’.
Offline
Re: mod_rewrite & section names
And use a custom field for those articles that have a translation and if the custom field has data a link appears and if not it doesn’t. If the custom field contained the URL title of the English translation you could build the link dynamically.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1