From a8028df67e663c3b45c7b10c6ab93b9268f686f8 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 28 Apr 2009 00:08:14 +0000 Subject: [PATCH] ENHANCEMENT Added Translatable->MetaTags() to automatically insert markup for insertion into + * a HTML4/XHTML compliant section, listing all available translations + * of a page. + * + * @see http://www.w3.org/TR/html4/struct/links.html#edef-LINK + * + * @return string HTML + */ + function MetaTags(&$tags) { + $template = '' . "\n"; + $translations = $this->owner->getTranslations(); + if($translations) foreach($translations as $translation) { + $tags .= sprintf($template, + $translation->Title, + i18n::convert_rfc1766($translation->Locale), + $translation->Link() + ); + } + } + /** * If called with default language, doesn't affect the results. * Otherwise (called in translation mode) the method tries to find translations