skel prefix naming / Page id changing
Frederick Ros
sl33p3r at free.fr
Fri Aug 5 16:26:30 EDT 2005
William Morgan wrote :
| I'm very interested to see what you come up with. Having a nice way for
| Hobix to do multi-lingual blogs would be great.
OK. I had a look last night. First of all be indulgent, as I had a
couple of beer in me at this time ;)
My purpose was the following: from a single entry, holding content for
let's say 2 languages en and fr, I want to generate 2 versions of the
same blog: one with the en content (located in weblog.link/en) the other
one with the fr content.
My first attempt was to create my own skel_index, skel_entry and so
on. They both return not 1 (Page, entries) couple but 2 (one for each
language).
However this did not work, as in the load_and_validate_entry load the
entry based on the entry id .. which is the same regardless of the
content language.
Then I look at creating 2 directory in the skel directory : en and fr,
each with the index.html.quick, entry.html.quick and so on. However in
this case I would have to explicitly write something like <%
entry.content_en %> or <% entry.content_fr %> in the templates, which
seems not very scalable/nice ;)
So I think that to achieve this I will have to have both a new entry
class, but also a new output plugin which can choose what language to
render based on either the name of the template of the path where it
reside ...
However as I mentioned it, and as I was not quite *humm* let's say clear
, I'd like to know if someone as another better idea on this ...
--
Frederick Ros aka Sleeper -- sleeper at jabber.org
Treat end of file conditions in a uniform manner.
- The Elements of Programming Style (Kernighan & Plaugher)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050805/80f88527/attachment.bin
More information about the Hobix-is-the-way
mailing list