<?php
/**
 * Bitrix Framework
 * @package bitrix
 * @subpackage main
 * @copyright 2001-2012 Bitrix
 */
namespace Bitrix\Main;

use Bitrix\Main\Localization\Culture;
use Bitrix\Main\Localization\Language;

class AdminPage extends Page
{
    public function __construct(Application $application)
	{
		parent::__construct($application);

		$this->initializeCulture();
	}

	protected function initializeCulture()
	{
		$culture = null;

		$arLanguage = Language::getCurrent($this->application);
		if($arLanguage !== false)
			$culture = Culture::getInstance($arLanguage["CULTURE_ID"], $arLanguage["LID"]);

		if($culture === null)
			$culture = new Culture();

		$this->getContext()->setCulture($culture);
	}
}
