nuxeo-localizer
[Top][All Lists]
Advanced

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

[Nuxeo-localizer] Re: changelanguage


From: Juan David Ibáñez Palomar
Subject: [Nuxeo-localizer] Re: changelanguage
Date: Thu, 06 Mar 2003 20:42:20 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021226 Debian/1.2.1-9


Ok, problem found, it is strange this has been the first time
I face it. Explanation follows..

If you use:

 <tal:block content="structure here/Localizer/changeLanguageForm" />

it works, why?

Look at the html source, the url from your code looks like:

 Localizer/changeLanguage?lang=en

a relative url, while the url from changeLanguageForm is:

 http://localhost:8080/test/Localizer/changeLanguage

an absolute url, Localizer is in the test root.

So the cookie is set where the url points. With the absolute url
it will always be the application's root, with a relative url it
will the folder from where you call it.

I wouldn't say that the current Localizer's behaviour is wrong.
But it probably needs to be documented, for now I will add an
entry to the TODO list.


Best regards,
david


Claus Rosenberger wrote:

the problem is because i'm using macros with acquisition to call the flags.

you can try with the exported zexp file i attached.

i use mozilla 1.3b.

regards

claus

Hello, and apologies for the delay,

I have tried the example and it works here, could you send
me a zexp file with something that does not work for you?
and, which Mozilla version do you use?


Regards,
david



Claus Rosenberger wrote:

hello,

we talked about a problem with changing the language globally a few
weeks before. i have a page installed which should set the language
globally for all subpages but i doesn't. i have one cookie for every
subfolder of my page in my cookie-manager of mozilla. i didn't find a
solution the weeks before so i decided to add a procedure for using the
zope sessions to set the language. with this i can change my language
globally. you told me that it isn't necessary to use this function. if
i made an mistake while include your localizer in my page, please help
me to solve.

i have following structure

zope-root/test/

in test i added a localizer-instance with languages de and en.
the accept_methods are "accept_cookie accept_path".

i have a subfolder-structure for my menus :

zope-root/test/{menu1,menu2,menu3,....}

in every index_html i call a macro:

<table style="margin-top:0.2em" metal:define-macro="select_form">
  <td align="left" valign="top">
    <a href="Localizer/changeLanguage?lang=de" id="de">
         <img src="default_img.png" border="0"
              tal:define="im here/imagefolder/flag_german"
              tal:attributes="src    im/absolute_url;
                              width  im/width;
                              height im/height;
                              alt    im/title" />
    </a>
  </td>
  <td align="left" valign="top">
    <a href="Localizer/changeLanguage?lang=en" id="en">
         <img src="default_img.png" border="0"
              tal:define="im here/imagefolder/flag_british"
              tal:attributes="src    im/absolute_url;
                              width  im/width;
                              height im/height;
                              alt    im/title" />
    </a>
  </td>
</table>


this should call changeLanguage in my only Localizer-instance in my
test-directory.

if i look in cookie-manager of mozilla i see more then one cookie
installed, one for every menufolder.


thanks for help

claus






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




--
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]