Kent Larsson
2009-Mar-27 20:59 UTC
[webgen-users] Some questions about webgen with a focus on bilingualism
Hi, I''m new to webgen, in fact I have only installed it and not generated a site yet. I''m curious about webgen and have some questions which might affect if I''m able to use it or not. So that''s why I''m asking now. Please excuse me if I missed some information on the web site, I mostly read enough to install it and get exited over the minimalist philosphy! ;-) As I am from Sweden I''ll create a web site which is written in both Swedish and English. Some posts will be in both languages while others will be in only one of them. I want to have a static web site but add a dynamic aspect using JavaScript, if it''s possible: I would like the users who has Swedish set as their preferred language in their browsers to only see the Swedish version of posts written in both languages. They will also see posts written in English only. The users who has English as their preferred language would only see English posts and not any posts in Swedish. If a user chooses Swedish and/or English as an active decision this decision will override the users set browser language. I would store the decision in a cookie so that it''s remembered (as far as the user lets the cookie live) next time they visit. What do you think? Does it sound possible? Also is webgen able to generate RSS-feeds according to {a : A post in Swedish,English but only Swedish if it exists}, {English}? And lastly, is webgen suitable to use for a blog? I think there is an extension to enable comments using http://disqus.com . If some of the above is features which doesn''t exist in webgen, do you think it''s possible for me to add them by writing extensions? I''ve never used Ruby but I do know how to write software. Best regards, Kent
Thomas Leitner
2009-Mar-28 06:11 UTC
[webgen-users] Some questions about webgen with a focus on bilingualism
> I want to have a static web site but add a dynamic aspect using > JavaScript, if it''s possible: > > I would like the users who has Swedish set as their preferred language > in their browsers to only see the Swedish version of posts written in > both languages. They will also see posts written in English only. The > users who has English as their preferred language would only see > English posts and not any posts in Swedish. > > If a user chooses Swedish and/or English as an active decision this > decision will override the users set browser language. I would store > the decision in a cookie so that it''s remembered (as far as the user > lets the cookie live) next time they visit. > > What do you think? Does it sound possible?It sounds certainly possible but I don''t know how to do this with JavaScript. You could use Apache''s functionality to correctly select the language base on the filename (see Apache language negotiation and the AddLanguage directive).> Also is webgen able to generate RSS-feeds according to {a : A post in > Swedish,English but only Swedish if it exists}, {English}?It is theoretically possible and everything''s there, but it is not implemented in this way currently. There has been another thread with a similar request and I will look into this.> And lastly, is webgen suitable to use for a blog? I think there is an > extension to enable comments using http://disqus.com .webgen is certainly suitable for a static blog. However, it currently lacks out-of-the-box suppport for many things a blog needs (for example, tags). Full blog functionality will be supported in a future release.> If some of the above is features which doesn''t exist in webgen, do you > think it''s possible for me to add them by writing extensions? I''ve > never used Ruby but I do know how to write software.It is not hard to write extensions to webgen. Just read through the API documentation. I have included examples for all the major extensions like source handlers and tags. Best regards, Thomas