nuxeo-localizer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nuxeo-localizer] Strange issues with LocalContent objects


From: Juan David Ibáñez Palomar
Subject: Re: [Nuxeo-localizer] Strange issues with LocalContent objects
Date: Fri, 05 Jul 2002 11:33:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020610 Debian/1.0.0-1

Alexander Gräfe wrote:

On Fri, Jul 05, 2002 at 10:38:54AM +0200, Juan David Ibáñez Palomar wrote:

What I would do is to have a link for every language, instead
of using a selection box or something else. The link would have
the right url "/en/xxx" which would be calculated by a script
in the server.

This has the advantage of avoiding the need of javascript, cookies
and the chache problems. At the same time the interface is better
(if there aren't too many languages).

Well, unfortunately, the customer wants the dropdown box. I'll see if I
can get the designer on my side in eliminating that box...


In this case you'll need javascript, but not too much:

 <select onchange="location.href=this.options[this.selectedIndex].value">

And each option has the right url as the value, which is calculated in
the server side.


I'll do the same in my own web site, and this is the thing that I
like more, more than the changeLanguageForm. I'll probably provide
a helper method in a future version that helps to do this (or you
can contribute it if you do it first :-)).

It could be something like:

'%s/%s/%s' % (container.Localizer.absolute_url(), language, path)

I am working on this right now, but I feel like am blindly poking at
stuff :-) But if I manage to get it working, I'll send it your way.


The challenging part is to keep all the urls relative, this is
easy for the content (because you know where you are), hard for
the navigation system.

Another option is to use absolute urls for the navigation system,
then you must be sure that they include the language.

Anyway, you'll need some logic in the server side.


--
J. David Ibáñez, http://www.j-david.net
Software Engineer / Ingénieur Logiciel / Ingeniero de Software





reply via email to

[Prev in Thread] Current Thread [Next in Thread]