The Toolkit for Online Communities
18174 Community Members, 0 members online, 2103 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : Notification intervals widget i18n : One Message

Forum OpenACS Development: Re: Notification intervals widget i18n

Posted by Matthew Geddert on
you can't run tcl code within a select statement, but you can pull it out of the database and have the adp parser automatically translate it. You could do one of two things:

Either set up a select query like this:

<fullquery name="notification::get_intervals.select_intervals">
            select '#notifications.' || name || '#' as name,
            from notification_intervals,
            where notification_intervals.interval_id = notification_types_intervals.interval_id
            and type_id = :type_id
            order by n_seconds
Note that some types of display procs do not automatically process these snippets - i've encountered this a few times, so if they don't it would need to be the same thing without the hash (#) sign and then run [_ notifications.name] as a separate process in tcl.

Or, even better, if you don't have the problems mentioned above would be to upgrade notifications and store the values as #notification.name# in the database table, that way they show up everywhere as translated messages. This is how thing such as dotlrn relationship types are stored in the db.