From: Andreas Schwarz Date: 2004-03-08T07:39:40+09:00 Subject: Re: Looking for HTML templating system Shu-yu Guo wrote: > I have also chosen to write a forum in Ruby, and the solution I came up with > for i18n is that the templates should not include program-determined > user-visible strings. What that basically means is that the task of > translating the message isn't in the template files but in the program. Yes, of course. > For example, using an Amrita-like system, I would do something like > > exp_data = { :login_string => i18n("Login") } > # Expand or somesuch. > > where i18n is just a wrapper for gettext from the Ruby GetText library. I didn't take a closer look at gettext, what are the main advantages over a simple hash-based system? > As for different languages via preferences, I originally thought of doing this > but a friend has convinced me that it's pointless to have a forum run on more > than one language at one time. > A forum run in Germany will have all its posts in German anyhow, > what's the point of having the menus in English (and > vice-versa)? I originally intended to hard-code the language setting in the config file, but as I plan to add an english section to my forum I thought it could be useful to make it selectable for the user.