"med" <[EMAIL PROTECTED]> wrote: > Now for the question: > I'd like to set up a multi-language site without midcom using old-aegir style > (well actually it's about adding english translation-articles to a german > site) > , but midgard-api-reference about the language section is a bit behind of > normal "completeness"... > Has anyone done something like that and can give some usefull tips/tutorials > to that?
All you have to do is to call mgd_set_lang($int lang). When article is created set lang to de and call update method. This will create german translation of Your article. <?php $art = new midgard_article(); $art->get_by_id($id); mgd_set_lang($de_lang_id); $art->content = "german content"; $art->update(); mgd_set_lang(0); ?> Of course you must set and define lang somehow. It may be passed in url , set from browser, etc. Set lang again to get article with correct translation. <?php /* some code which gets current lang */ mgd_set_lang($lang_id); $art = new midgard_article(); $art->get_by_id($id); ?> &(art.content); Piotras --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
