Hello Sergio,
Friday, August 18, 2000, 12:29:06 AM, you wrote:
> I'm working in an site (http://distro.conectiva.com.br) already Midgard-based
> (1.2.5) with success until now.
> We are internacionalizing it now, and we have 2 different problems:
> - static content, ie, page elements;
> - dynamic content, ie, topic/articles;
> The static content is my problem now:
> I was thinking in this pseudo-code:
> <?
> $page = mgd_PAGEMYSELF(); // is there a way to recover the name of the actual page
>element?
> $newpage = $page ."_". $lang; // say, $page == "foo", and $lang can be "pt_BR",
>"en", "es", and so on.
> $newpage_ob = $mgd_get_pagebyname($newpage);
> echo $newpage_ob->content;
?>>
> or, perhaps, an active page which execute static pages?
Probably it's better to use articles, especially with Midgard 1.4.
Suppose that you have topic and articles in it named as $lang (article
has 'name' and 'title' fields, so it is not a problem with them). Then
you can create active page which accepts ID for subtopic ('article'
from the point of view of visitor) and then looks for article named
$lang in it.
<?php
$article = mgd_get_article_by_name($id, $lang);
?>
And then display it.
Pros: simplicity.
Cons: for each article you have to create sub-topic. There will be no
articles in actual topic but many subtopics which represent
'articles'.
Another way is to use replies to articles as additional translations,
but this way you need to fetch all replies until good one will be
found because we have no function yet to get replies by name.
--
Best regards,
Alexander mailto:[EMAIL PROTECTED]
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]