Overriding languagefilter plugin to support multidomain site

149 views
Skip to first unread message

Qson

unread,
Aug 30, 2012, 8:31:27 AM8/30/12
to joomla-de...@googlegroups.com
Hi!
My customer wants a multi language site (single Joomla installation) with one domain (tld) per language.
Example:
www.abc.se - Swedish
www.abc.no - Norwegian
www.abc.de - German

They do not want the language code appended to the url path but select language using the TLD. One solution that works  is www.abc.se/se/ and www.abc.no/no/, this with the default languagefilter plugin since it appends the language code, and then using htaccess to redirect www.abc.no/de to www.abc.de/de/ to avoid duplicate content.

Now I figured I could write a new plugin to replicate the behaviour of plg_system_languagefilter but it seems not to be working. I tried a plugin which extended plgSystemLanguageFilter but this did not work either.
It seems like Joomla's application core is tied strictly to the languagefilter plugin (plg_system_languagefilter). The languagefilter plugin redirects if the language code is missing in the url, and since my goal is to get rid just that it seems like a catch 22.

Any ideas?

Modifying the plg_system_languagefilter is one way to go, but that would break updating and I don't feel comfortable hacking the core.

Thanks!
// Qson

JM Simonet

unread,
Aug 30, 2012, 10:53:28 AM8/30/12
to joomla-de...@googlegroups.com
In fact, what would be great is to introduce in the plugin a parameter per existing Content Language that redirects to mysite.no/ mysite.com/, etc.. without any lang code and htaccess
I guess it is too late for 2.5.x, but any patch is welcome for 3.x

JM
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/9k2rV-arLB8J.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.


-- 
Please keep the Subject wording in your answers
This e-mail and any attachments may be confidential. You must not disclose or use the information contained in this e-mail if you are not the
intended recipient. If you have received this e-mail in error, please notify us immediately and delete the e-mail and all copies.
-----------------------------------------------------------
Jean-Marie Simonet  /  infograf768
Joomla Production Working group
Joomla! Translation Coordination Team 

Ove

unread,
Aug 30, 2012, 11:11:53 AM8/30/12
to joomla-de...@googlegroups.com, Qson
Hi,
interesting.

You have another problem as you mention EU countries. The EU cookie
regulation.
On what version are you? 2.5 latest?
I made some tests to get rid of the language cookie a while ago and only
by hacking the platform core it was possible. I think all is now in the
plug-in but I'm not sure. i.e a fork of the languagefilter should work
(as long as you don't use the language switcher module) Since there is
now at least one woking solution available to block all cookies
(including the session cookie), this problem is solved. To my surprise
the language switcher worked without the language cookie. I suppose
because of the language code in the uri!

If a "mylanguagefilter" is not possible and your customer do not care
about this EU regulation it might work if you set this cookie with a
plug in before the languagefilter is loaded I'm really not sure!

Ove

Ove

unread,
Aug 30, 2012, 12:03:36 PM8/30/12
to joomla-de...@googlegroups.com, Qson
I just found that without an activated languagefilter it will not work.
Now to be found in the Cms class JLanguageMultilang. i.e. a fork with
another name is not possible.

The idea from JM is nice!
Reply all
Reply to author
Forward
0 new messages