nuxeo-localizer
[Top][All Lists]
Advanced

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

Re: [Nuxeo-localizer] Proposal: local object


From: Juan David Ibáñez Palomar
Subject: Re: [Nuxeo-localizer] Proposal: local object
Date: Fri, 15 Feb 2002 15:55:36 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20020203

Milos Prudek wrote:

Juan David Ibáñez Palomar wrote:

Hi again,

I'm going to describe a new kind of object that could be added
to Localizer and would like to know wether you find it useful
or not.


Do you think it's useful??


I think it could be useful. I have discovered that <dtml...> code in LocalContent object is not rendered. But in my particular case it was probably a good thing... saved me from writing too complicated code.


A side effect of LocalContent is the separation between the data
(also known as content) and the software (presentation and logic).

It's a feature.


On the other hand, if you do not implement this function, programmer may work just as easily by creating this DTML Method called localdate:
<dtml-if "ENV_LANG_VAR=='es'">
  <dtml-var long_date_es>
<dtml-elif "ENV_LANG_VAR=='de'">
  <dtml-var long_date_es>
<dtml-else>
  <dtml-var long_date_en>
</dtml-if>

...where ENV_LANG_VAR is environment variable that holds Localizer's language choice (I do not know what is the name of this variable right now).


The true name is "USER_PREF_LANGUAGES", and it's a list,
so that code wouldn't work.

And now, in the CVS, it isn't anymore a list, now it's an object
that represents a tree.


And maybe even a "variable variable" could be created: 'long_date_'+ENV_LANG_VAR. I think it's possible to do this in DTML, but I don't presently know the syntax.


I don't understand..


--
J. David Ibáñez, Nuxeo.com
Python programmer (http://www.python.org)






reply via email to

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