bfojcapell: Added default use of Translatable and an html metatag with the content language

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42123 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-16 16:21:09 +00:00
parent 06909765d6
commit 835574ffe4

View File

@ -171,8 +171,8 @@ class SiteTree extends DataObject {
static $extensions = array( static $extensions = array(
"Hierarchy", "Hierarchy",
"Versioned('Stage', 'Live')", "Translatable('Title', 'MenuTitle', 'Content', 'URLSegment', 'MetaTitle', 'MetaDescription', 'MetaKeywords', 'Status')",
); "Versioned('Stage', 'Live')" );
/** /**
@ -635,7 +635,7 @@ class SiteTree extends DataObject {
/** /**
* Return the title, description and keywords metatags. * Return the title, description, keywords and language metatags.
* @param boolean|string $includeTitle Show default <title>-tag, set to false for custom templating * @param boolean|string $includeTitle Show default <title>-tag, set to false for custom templating
* *
* @param boolean $includeTitle Show default <title>-tag, set to false for * @param boolean $includeTitle Show default <title>-tag, set to false for
@ -664,6 +664,7 @@ class SiteTree extends DataObject {
if($this->ExtraMeta) { if($this->ExtraMeta) {
$tags .= $this->ExtraMeta . "\n"; $tags .= $this->ExtraMeta . "\n";
} }
$tags .= "<meta http-equiv=\"Content-Language\" content=\"". Translatable::current_lang() ."\"/>\n";
return $tags; return $tags;
} }