Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-10-25 15:44:32
- MrLongbaugh
- Member
- From: Hamburg - Germany
- Registered: 2004-10-11
- Posts: 116
Multi-Domain and Multi-Language
For a relaunch of an TXP-MLP driven site multi-domain support is needed.
Each domain represents a country like swiss with the languages de, it, fr. For germany it is only de but it has to be different from the swiss one like de-de, de-ch. Like en-us and en-gb.
I really like the way MLP works with translations and would like to stick to that solution.
Just stumbled upon ied_if_domain. Maybe that could help.
I would like to ask for your advice if there is a way to solve that with TXP.
Thanks in advance.
Regards
MrLongbaugh
Offline
Re: Multi-Domain and Multi-Language
Interesting. I’m currently developing a site of similar characteristics.
Although I haven’t tinkered too much with the code yet, I’ve already configured a TXP + MLP + multi-site functionality + cnk_versioning + ied_if_domain + a load of plugins…
The idea is to have sites running on: us.domain.com/en, us.domain.com/es, eu.domain.com/en, eu.docmain.com/es, etc, etc, etc.
So far, this is an outline of the situation:
- each subdomain is an standalone TXP site. That is, each subdomain has its own database, and users will have to log to each of them independently of the sites. Ideally, it would be nice to be able to “tie up” this, by sharing all the users’ login across every subdomain site.
- all sites are running from the same TXP base install. I’ve chosen to keep the “subdomain.domain.com/admin” way of accessing the admin side, as adding another sub-subdomain to the URL just to access the admin side seemed too much.
Some limitations and glitches I’ve already spotted:
- on a few plugins, the path to /texpattern/ is hardcoded, so the way to make them work is by modifying them. Not ideal (an what is worst, I’ve already done some changes and I haven’t documented it, so I’m risking the chance of screwing things up when upgrading plugins… hehe).
- search tool won’t be “site-wide”. That is, searches done using the built-in TXP search will be only done on a per-subdomain basis.
- I will let you know…
Some tips/tricks (that may make you feel like you are toying with plutonium) …
- As all the sites are going to share the same look&feel and functionality, I decided it would be cool to share pages, forms, css, js and plugins so:
- I’m using cnk_versioning to write pages/forms/css to the filesystem. A “clever” (ab)use of symlinks have let me share them across all subdomains. This will certainly speed up things a lot. Also, I’m somehow trusting (in advance, not tested yet) that ied_if_domain will be another key component of this setup, to make it easier to do subdomain-specific pages/form coding.
- also, I’m trying to share as many plugins as possible by installing them on the plugin_cache_dir (with the help of ied_plugin_composer). So far, it’s working almost fine, although there are some plugins that won’t work that way. Particularly, gbp_admin_library and the MLP itself.
I may be missing a few things I’ve learned by setting this up. I’ll try to keep you informed on how this worked.
Offline
#3 2009-10-25 21:19:56
- MrLongbaugh
- Member
- From: Hamburg - Germany
- Registered: 2004-10-11
- Posts: 116
Re: Multi-Domain and Multi-Language
That’s awesome.
The difference is the use of toplevel domains – not subdomains. But that shouldn’t be a problem.
Why are you using different databases? My goal is to reach a solution where I could use one.
I do like the plutonium part ;-) The cnk_versioning thing – I don’t really get right now. Have to look into that plugin.
Do you have a solution for publishing one article to other domains? Maybe via RSS? Otherwise you have to copy/paste all the stuff.
Thanks a lot for sharing.
Offline
#4 2009-10-26 23:47:55
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Multi-Domain and Multi-Language
I’ve been experimenting with the use of en-gb and en-us together. One problem is that it does display two columns in MLP > Articles, but both say ‘English’, and the only way to tell them apart is hovering over the ‘Clone all’ link next to it and look at the URL in the status bar. The other problem is that, though both languages are displayed by the l10n_lang_list tag, both point to /en/. And last but not least, the l10n_if_lang tag can only take a short value for the ‘lang’ attribute (“en” and not “en-gb”), so it doesn’t even seem to be possible to differentiate between two language ‘versions’.
It would be nice to hear Graeme’s thoughts about this. Don’t know how (im)possible it would be to have a preference setting that lets you choose between short and long language names (in URLs and the if_lang tag). Might make a nice feature request ;)
(BTW I feel this really belongs in the MLP thread, but unfortunately it’s not possible to move individual posts to another thread…)
Offline
Pages: 1