<?php
	require_once( $GLOBALS["site_root"]."/includes/widgets/MultiLangDataProvider.inc.php" );

	class FrontendMultiLangDataProvider extends MultiLangDataProvider {
		protected $sTitle = "";

		public function setTitle( $v ) { $this->sTitle = $v; }

		protected function generateLanguageLangdefs() {
			foreach ($GLOBALS["languages"] as $langiso => $langcode) {
				if (!isset( $this->aSiteLanguages[$langcode])) continue;
				$this->aSiteLanguages[$langcode]=__("language_sensitive_data_".$langiso);
			}
		}

		public function __construct( $id , $parent = null ) {
			parent::__construct( $id , $parent );
			$this->generateLanguageLangdefs();
		}

		public function render() {
			if ($this->sRendered) return $this->sRendered;
			$this->setParam( "title" , $this->sTitle );
			return parent::render();
		}

	}

?>
