Mark, Aitor, Thanks for your mails. Actually, my needs are simpler - that's where the idea started out. In my case,
Aitor - I agree that it seems a bit of a waste to duplicate the tags, but I'm not sure if there will be different tags for different languages. Also, there may be multiple parts to a page each of which may need to be in a different language. In my case, there are differences that come in due to: [1] Each language is probably maintained by a different person. [2] Each language may have a separate set of articles - there is no guarantee that every article will exist in English. It's likely that there are some articles that are present in only one of the languages. A lot may depend on how similar/ different the multiple language sites are. I think there are still a few unresolved issues :-S Cheers, Mohit. 9/11/2007 | 1:59 AM. Aitor Garay-Romero wrote: > > The scheme described by Mohit below addresses the selection of the > language, but we still need to store the translations. > > Given the simple tree structure of Radiant pages, i don't think > that duplicating the pages in different languages is a good idea. A > solution could be: > > - define different page parts for the language versions. For > example, have the parts "body_en", "body_fr" and "body_es". Or just > "body", "fr", "es". They could be "special parts" or not. > > - let Radiant choose the correct part, using the method described > by Mohit or by other means > > - i don't like the idea of duplicating the tags (structure) of > the page, so there must be a way to define a page template and then > connect that page to the translations in the different parts. One > solution could be to define <trans(late)> tags that are used like: > > <r:trans id="select_child">Please select a child:</r:trans> > <r:children:each> ... </r:children:each> > > In this case the page is defined in english, and the translations > are stored in the page parts and indexed by the translation id. Maybe > replace the <trans> tags by some other syntax sugar like the "_", "$" > or other symbol. > > - the translation of dates etc. must be also handled. For this > and more things it would be wise to take a look to how things arte > done in other Rails i18 plugins like Globalize. > > /AITOR > > > On 9/10/07, *Mohit Sindhwani* <[EMAIL PROTECTED] <mailto:[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] > <mailto:[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: [email protected] > <mailto:[email protected]> > >> Search: http://radiantcms.org/mailing-list/search/ > >> Site: http://lists.radiantcms.org/mailman/listinfo/radiant > >> > >> > > > > > > > > > _______________________________________________ > Radiant mailing list > Post: [email protected] > <mailto:[email protected]> > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant > <http://lists.radiantcms.org/mailman/listinfo/radiant> > > _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
