[development] relationships API vs i18n

Gabor Hojtsy gabor at hojtsy.hu
Thu Nov 9 21:21:02 UTC 2006

On Thu, 9 Nov 2006, Dries Buytaert wrote:
> On 09 Nov 2006, at 10:10, Gabor Hojtsy wrote:
>> The RDF triple approach is a true and tried method to handling relations 
>> (see the existing module description). I would propose that we should 
>> include a small triple handler in core. This would be good for i18n and 
>> other modules to use, so we might get to a win-win situation. Contrib 
>> modules can extend on this triple handling with RDF generation and such.
> Interesting thought, but it is not quite clear what you envision the 'triple 
> handler' to do?  Do you suggest we store RDF in the database?  (I don't like 
> that idea.)  Or should we just look at RDF and use matching 
> terminology/properties so we can generate RDF if we want to?

We should not store RDF. RDF at its basics is just a triple description 
format (a predicate about a subject relating to an object). This is like 
"node/6 is translation of node/2". We need to somehow adress node/6 and 
node/2 and we should be able to mark that the relationship is about 

We can of course introduce a new table into core to handle this just for 
i18n, and it would be very simple to do:

   CREATE TABLE translation (
     nid1 int
     nid2 int

The problem is that it is too domain specific and not really forward 
looking IMHO. We might just end up with this, but we might get further if 
we think ahead.

There is an ongoing relationships discussion in the community to somehow 
provide this triple-like system to relate nodes to each other (and even 
nodes to users etc).

By offloading this work to a relationships API, I hope to get more out of 
this "related nodes" concept then just binary relations of translation 
nodes. Also this would be something to do for those who are absolutely not 
interested in i18n, but would like to help bring some cool stuff into 

The existing relations efforts (some ready code) already operate in this 
field, and category module uses a similar conceptual approach. I hope that 
this way we can also revitalize the book module.

Whether you generate RDF out of these simple triples is up to you 
(certainly not with core support).


More information about the development mailing list