Language switcher frontend module

390 views
Skip to first unread message

Christophe Demko

unread,
Feb 11, 2010, 8:05:06 AM2/11/10
to Joomla! CMS Development
Hi Folks

We need your input about the feature of a "Language switcher frontend
module"

There are several way of doing that (including mine) but before
exposing it and without influencing your input, describe here what you
expect from this module.

Ch.D

infograf768

unread,
Feb 11, 2010, 9:41:56 AM2/11/10
to Joomla! CMS Development
It has been decided that 1.6 would not be fully multilingual, i.e. it
would not be a replacement for Joomfish where each item has its
equivalent.
Was also decided to have a language Switcher (specially to use on
frontpage) to display the items tagged for a specific language
(Articles, categories, modules, ..)
The Switcher would, if also present on other pages than the Home,
redirect to the home page and display these items.

To get this, language fields have been created in the db and an
interface in the UI where the items can be tagged.

The Language Manager has 2 parts (Tabs):
1. Listing site and admin languages available (installed) on the site.
Same function as in 1.5.
2. A Content part specifically designed to use for the language
tagging/assign.

This "Content" part, if used, lets designate a language (even if it is
not yet installed) to populate the lists proposed for all Language
fields tagging in the UI.

The idea is that,
1. if the site language is present
AND
2. the same language is designated as a "Content" language AND
published,

---> then the Switcher will display that language as a choice and ONLY
the items tagged for that language.

3. A parameter would let display or not untagged items with the
language chosen (That parameter may have to be elsewhere than in the
module, maybe in J! Global Config)

This lets user prepare a complete set of items assigned to a specific
language without even installing that language. Then release it when
ready.

Logically, a non-registered user should get a cookie and a registered
user should get its user's language params changed on the fly.

Airton

unread,
Feb 12, 2010, 2:19:20 AM2/12/10
to Joomla! CMS Development
+1 for this idea.

I see this as a first huge step towards a fully multilingual framework
in the future.

Using this language tagging feature, site managers could offer content
that are directed exclusively to the visitors of a given language/
languages. This would be an awesome feature for international sites
that may have "localized" content according to the reader's tongue.

Alex Kempkens

unread,
Feb 12, 2010, 8:45:25 AM2/12/10
to joomla-...@googlegroups.com
Hi,

Please don't get me wrong here - but are you not focusing on the wrong things atm? I have been told by Hannes that he want's to get out a Beta version by end of February. I downloaded the trunk and it is just not complete in the features that are available atm.

Instead of adding some more new features, shouldn't we focus on the completion of the existing once? As JM said, we had a decision that 1.6 is not going to have full language support and we have already far more than what we planed in July last year.

We have already a language switcher which allows the user to choose in his profile which language he prefers. If the corresponding frontend language pack is installed this is a very simple thing to do and use.

If you like to have a real module fell free to checkout the code of our language switching module within Joomfish. I'm happy to contribute that and it does already solve the problem. The change of languages can be done using the router and changes the language within the session or we can use the users profile. If this code is what you are looking for I'm happy to contribute it to the project and create a patch for it.

Alex

> --
> You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
> To post to this group, send an email to joomla-...@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.
>

infograf768

unread,
Feb 13, 2010, 1:27:59 AM2/13/10
to Joomla! CMS Development
Alex, since July last year, some aspects of 1.6 have been
reconsidered. Language is part of them.
The language switcher is part of the new features asked by the
Translation Team Coordination and was accepted by the PLT.
Its aim is not simply to change language UI but indeed to display
items tagged for the language chosen, not as some more complex
components do (like Joomfish), task which is indeed not forecasted for
1.6, but as a full site change, when implemented (see my post above).
This is why the Language Manager Content tab and the language fields/
params for each items are present in trunk.
In fact, Christophe has already started working on a patch that I
tested here and it does the job. It still needs some ironing out and
indeed the routing/SEF is an important matter.
I am sure he will like to share with you what he has done. As he is
away for a week, I guess he will contact you when back.

Ste

unread,
Feb 13, 2010, 11:07:58 AM2/13/10
to Joomla! CMS Development
As JM explained, this feature about language was requested by TT
coordination and approved, as it is an important step to switch
language without installing 3rd party extensions and may be will help
to develop new ones.

akede

unread,
Feb 15, 2010, 10:24:36 AM2/15/10
to Joomla! CMS Development
Ok - as I said, feel free to look at what we did with the language
switcher within Joomfish. The concept is simple and the router is
doing a great job.

The biggest issue from our experience is to make sure that other SEF
tools are able to handle this or take over the work because some
people like to switch their languages by using different domains or
others by using different additional URI tags. As the variations are
so huge we came to the conclusion that making them available as
parameters within the Joomfish router is the best way to offer the
variations.

I personally found it quite confusing to have a language change for
articles but not for the static text at the same time. This was why we
always defined in Joomfish that you need to install the frontend
language files if you like to have articles in a different language.
With the introduction of content languages this is of course
different.

Still I wonder what the language switcher should change. Are you only
going to filter out those articles that do not match the language or
do you change the frontend language files as well - if available?


I hear that there is a preference to go with the solution Christophe
developed already, this is why I suggest that you publish it and we go
in a discussion about this based on this. For me there are so many
aspects related to this topic that discussing without some kind of
reference is quite hard.

Greetings and good to see that languages get a higher importance for
1.6 - even so I'm a bit sad that this will clearly postpone the
releases again.

Alex

akede

unread,
Feb 15, 2010, 12:07:49 PM2/15/10
to Joomla! CMS Development
Some questions / answers I have ..

On 11 Feb., 15:41, infograf768 <infograf...@gmail.com> wrote:
> Was also decided to have a language Switcher (specially to use on
> frontpage) to display the items tagged for a specific language
> (Articles, categories, modules, ..)

Ok, If I understand this correct than the module is rather a language
switcher but a language filter. It shows me only those articles that
are in the language I select.

The question for me is: are those articles that are not tagged at all
show or not. The answer is below with the parameter in the module
which will include them or not.

Alternatively I could think about a solution which automatically tags
all new items with a default language. It is written in one of them,
so this can make things more easy.

> The Switcher would, if also present on other pages than the Home,
> redirect to the home page and display these items.

Why should this be? I'm not sure if I as a user would understand being
redirected just because I switch a language.

> The idea is that,
> 1. if the site language is present
> AND
> 2.  the same language is designated as a "Content" language AND
> published,
>
> ---> then the Switcher will display that language as a choice and ONLY
> the items tagged for that language.
>

So if my site default is en-GB and I have additionally installed de-DE
and configured de-DE as content language I will see it in the language
switcher.

> 3. A parameter would let display or not untagged items with the
> language chosen (That parameter may have to be elsewhere than in the
> module, maybe in J! Global Config)

Why do you think this parameter should be somewhere else than the
module?

> Logically, a non-registered user should get a cookie and a registered
> user should get its user's language params changed on the fly.


I personally would only use the cookie even for registered users. It
might be someone has a different primary language and with switching
the language he does not want to change this primary language, but
just view his work in the other language. At least our experience is
that people like this better than having change all the time.

Alex

PS: I personal comment as it might got understood wrong before. I
highly appreciate these efforts and will support them as much as I
can.
PPS: I created a wiki page to summarize the specs a bit. For me this
is easier to see the final specs rather than to try to read a whole
thread
http://docs.joomla.org/Language_switcher_frontend

akede

unread,
Feb 15, 2010, 12:08:00 PM2/15/10
to Joomla! CMS Development
PS: I had a great talk with JM on Skype just a minute ago.

I understood that this is far simpler than the Joomfish and I was
referring to the language switch module and router we have within
Joomfish and NOT the whole implementation.

The idea is to create a little branch to implement this and see how it
can work on some wiki docs too.

Reply all
Reply to author
Forward
0 new messages