<?php
namespace Claromentis\Core\Localization;

$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"] ?: array()) + array("_e608e5b" . "5c4c34a6" . "7ba97ef8" . "4c1e1619" . "9" => base64_decode("J" . "w" . "=" . "="), "_aef8d01f1d32e6333fa01fc401e05" . "eee" => base64_decode("bG9jYWxpemF" . "0aW9u"), "_4d707fab93bebb00bbe69e815969" . "7c90" => base64_decode(""), "_982bb11c1217d9ad3a391d" . "72827f54ce" => base64_decode("Q2FuJ3QgZmluZCBsb2NhbGl6YXRpb24gc3RyaW" . "5nICc="));
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["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_aef8d01f1d32e6333fa01f" . "c401e05eee"]];
    }
    
    
    
    
    
    
    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["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_aef8d01f1" . "d32e6333fa" . "01fc401e05" . "eee"])->warning($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_982bb11c1217d9ad3a391d728" . "27f54ce"] . $key . $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_e608e5b5c4c34a67ba97ef" . "84c1e16199"]);
            return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_4d707fab93bebb00bbe69e81596" . "97c90"];
        }
    }
    
    
    
    
    
    public static function KeyExist($key)
    {
        if (!self::$localization) {
            self::Init();
        }
        return self::$localization->KeyExist($key);
    }
}