<?php
namespace Claromentis\Core\Localization;

$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("_4d707fab93bebb0" . "0bbe69e8159697c9" . "0" => base64_decode(""), "_aef8d01f1d32e6333fa01fc401e05" . "eee" => base64_decode("bG9jYWxpemF0aW9" . "u"), "_e608e5b5c4c34a67ba97ef" . "84c1e16199" => base64_decode("J" . "w" . "=" . "="), "_982bb11c1217d9ad3" . "a391d72827f54ce" => base64_decode("Q2FuJ3QgZmluZCBsb2Nhb" . "Gl6YXRpb24gc3RyaW5nIC" . "c="));
use Claromentis\Core\Localization\Exception\MissingPhraseException;
use Claromentis\Core\Services;




class Facade
{
    
    
    
    
    protected static $localization;
    
    
    
    
    protected static function Init()
    {
        global $g_application;
        self::$localization = $g_application[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_aef8d01f1d" . "32e6333fa01" . "fc401e05eee"]];
    }
    
    
    
    
    
    
    public static function SetLocalizationService(Localization $_aef8d01f1d32e6333fa01fc401e05eee)
    {
        self::$localization = $_aef8d01f1d32e6333fa01fc401e05eee;
    }
    
    
    
    
    public static function UnsetLocalizationService()
    {
        self::$localization = null;
    }
    
    
    
    
    
    
    public static function SetLanguage($_059707644b06dfe19a36970b58499427)
    {
        if (!self::$localization) {
            self::Init();
        }
        self::$localization->SetLanguage($_059707644b06dfe19a36970b58499427);
    }
    
    
    
    
    public static function GetLanguage()
    {
        if (!self::$localization) {
            self::Init();
        }
        return self::$localization->GetLanguage();
    }
    
    
    
    
    public static function GetLocale()
    {
        if (!self::$localization) {
            self::Init();
        }
        return self::$localization->GetLocale();
    }
    
    
    
    
    public static function GetDateFormatter()
    {
        if (!self::$localization) {
            self::Init();
        }
        return self::$localization->GetDateFormatter();
    }
    
    
    
    
    
    public static function GetPhrase($key)
    {
        if (!self::$localization) {
            self::Init();
        }
        try {
            return self::$localization->getTranslation($key);
        } catch (MissingPhraseException $_fe441aa3ef350bfb1a1a1ad8520dd530) {
            Services::I()->GetLogger($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_aef8d01" . "f1d32e63" . "33fa01fc" . "401e05ee" . "e"])->warning($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_982bb11c1" . "217d9ad3a3" . "91d72827f5" . "4ce"] . $key . $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_e608e5b5c4c34a" . "67ba97ef84c1e16" . "199"]);
            return $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_4d707fab93bebb00bbe69e815" . "9697c90"];
        }
    }
    
    
    
    
    
    public static function KeyExist($key)
    {
        if (!self::$localization) {
            self::Init();
        }
        return self::$localization->KeyExist($key);
    }
}