i need a good multi-language facility also and would be happy to help implement if this idea is the way fwd.
On 11/09/2007, Mohit Sindhwani <[EMAIL PROTECTED]> wrote: > > Hi Sean, > > This is what I have in mind for it right now. I didn't want to propose > anything in the first email so that I wouldn't bias people :) > > Given the Rails philosophy, this 'workaround' assumes a few things - > let's call it convention over configuration :D > > 1. I was thinking that it should be possible to maintain a list of > languages that are currently available in the system. I'm not sure what > would be the best place for this (either the DB or YAML or config or > something) but let's not get bogged down by that yet. So, we have a > file that has a list of languages that are supported = [TH, EN, CN, MY, > ES, JP, KR, ..] > > 2. Now, we ensure that every article that is created in a different > language has the same name in every language but it is in a different > 'subsite' so to speak. So, you have > /hello_world <- main english site (primary language) > /es/hello_world <- Espanol > /my/hello_world <- malay > /../hello_world > > 3. When we render a page, first we extract the base name of the page > [hello_world] above. Then, when we render the 'language bar' for a > page, we go through the list of supported languages and try to look for > /th/hello_world, /cn/hello_world, /my/hello_world, ... and > /hello_world (for the main site) > If the find URL succeeds, we render a link for it. > > 4. Additionally, we could have a piece of JavaScript that checks to see > if the name that you are adding exists in another language when you add > it in - and alerts you if it does. That gives you a visual check if 2 > articles have similar names or if you expected that this is a > translation for another article and you got the name slightly wrong. > > What do you think? I have no idea what kind of performance constraint > this might impose. > > That's my first thought. Now I have to think of going about > implementing it if it seems like the way forward. > > Cheers, > Mohit. > 9/10/2007 | 10:08 PM. > > > > Sean Cribbs wrote: > > Interesting problem. No, the language-redirect behavior/extension > > reads the preferred language sent by your browser and sends the user > > to a whole different subsite based on that language. Multiple > > language support in Radiant is still very nascent; we'd love to hear > > some ideas or see some unique solutions. > > > > Sean > > > > On 9/10/07, Mohit Sindhwani <[EMAIL PROTECTED]> wrote: > > > >> Hi Everyone, > >> > >> In my site [currently being tried out at http://tec.onghu.com ] that is > >> powered by Radiant, I have a number of articles and news pieces. For > >> some of them, translations in other languages exist. In those cases, > >> when I display the article, I would like to show a link to the same > >> article in a different language. > >> > >> So, if I have the article in English, Thai and Chinese, and you are > >> viewing the English version, I'd like to also show in the "Language > >> Bar", the option to "View this article in [Thai] | [Chinese]". If > >> you're viewing it in Thai, it would show "View this article in > [English] > >> | [Chinese]" > >> > >> Do you have any recommendation on how I should go about this? I don't > >> think this exactly maps to the 'Language Redirect Behaviour' but if it > >> does, I'd like to be corrected. > >> > >> Thanks, > >> Mohit. > >> > >> > >> _______________________________________________ > >> Radiant mailing list > >> Post: Radiant@lists.radiantcms.org > >> Search: http://radiantcms.org/mailing-list/search/ > >> Site: http://lists.radiantcms.org/mailman/listinfo/radiant > >> > >> > > > > > > > > > _______________________________________________ > Radiant mailing list > Post: Radiant@lists.radiantcms.org > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > _______________________________________________ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant