Re: Templates & Languages
| From: | Vincent Gevers | Date: | Tue, 28 Sep 2004 09:46:01 +0000 |
| Subject: | Re: Templates & Languages | ||
| References: | 1 | Groups: | php.doc.web |
| Request: | Send a blank email to doc-web+get-339@lists.php.net to get a copy of this message | ||
On Monday 27 September 2004 22:49, Sean Coates wrote:
> Hello all,
>
[...]
>
> If there are any questions, I'll be happy to answer.
> Also, if I've done anything completely stupidly, I'm open to hearing
> that, too.
> I'm open to suggestions.
For some reason I'm not sure about adding all html in the templates.
looking at header.tpl.php:
it contains 40 lines, I found 3 lines that can be translated.
If we want the pages to be translated we should allow the doc teams to
create/edit them. This means they can also edit the html code or even break
the site.
but for another file, home.tpl.php, it only contains a few html tags.
Including the tags makes sense here.
Although broken html/code will only mess with the pages for that language it
might be better to avoid it.
my idea is like this: (not based on the real functions)
/*
in language file:
$txt = array('Home' => 'Page d\'accueil sous-section',
'RFC' => 'Système RFC'
);
*/
$links = template::get('pear', 'fr', 'nav');
foreach ($links as $name => $link) {
echo ....
}
above is not a perfect solution at all (quoting etc), but it keeps the real
code 'safe' and making translation a bit more user friendly
Comments welcome
Vincent
>
> See patch.
> http://www.phpdoc.info/docweb_template_language_patch.txt (too
> large to
> attach)
>
> S
> --
>