Forum OpenACS Development: Re: named objects

Collapse
14: Re: named objects (response to 1)
Posted by Timo Hentschel on
Dirk, your solution does have certain drawbacks: The default language can't be hardcoded as in your example, but actually is an apm_parameter. Further, we can't be sure that there's always a translation in the default language available. In my categorization package i made sure that that's always the case (and maybe some people won't like that code, but it helped me write slightly faster code in tcl to fetch the translation from the cache). So, what will you do if you can't get an object_name in the language the user requests nor in the default language? You should probably display it in just any language (although this adds a certain randomness, but so what) since i'm quite opposed to not showing such an object at all (what if the user is an admin and really needs to see every object and doesn't care at all if he can actually read it or not?).

In chatting with Peter we concluded that his approach of caching the translations of every acs_object might be ok. But how about a mixture of both to speed up the total query time since Dirk is worried about the speed of tcl code? How about trying to get direct matchings from the database (when there's a translation in the users language available) and let tcl figure out the best translation from the cache in the other cases? Therefore we would have a fast db query and use tcl only in those cases, when it's really best to use it.

Collapse
15: Re: named objects (response to 14)
Posted by Dirk Gomez on
The SQL code is a direct cut and paste from the mentioned Oracle document and I didn't intend to put that into OpenACS without change.

As I said: at the moment (!) I am leaning towards not showing anything if a user can neither be shown something in his chosen language nor in the default language. I wouldn't want to promise a site translated into a user's language that falls back all the while into some other random language.

Maybe someone who is running (Greenpeace) or intends to run (Heidelberg) a multilingual site can give us some "real-life" input on that.

Collapse
16: Re: named objects (response to 14)
Posted by Dirk Gomez on
In fact: these two views struck me because they provide a transparent means of "multilingualising" columns. I think we should consider taking up on this!