<?php
namespace Helpers\Trad;

use Helpers\Outil\Sql;

class TradDev implements ITrad
{
    public function __construct()
    {
    }

    public function copy(string $lang) :ITrad
    {
        return new self();
    }

//_____________________________________________________________________________
// Process

    public function t(string $s) :string
    {
        return 't| ' . $s;
    }

//_____________________________________________________________________________
// Accessor

    public function getLangCode() :string
    {
        return $_SESSION['Session_Langue'] ?? '';
    }
    
//_____________________________________________________________________________
// Shorthand


    public function colon() :string
    {
        return "\xc2\xa0: ";
    }

    public function displayBool(mixed $bool) :string
    {
        return Sql::toBool($bool) ? $this->t('Oui') : $this->t('Non');
    }

    public function modeBufferTrad(bool $buffer = false) : void
    {
        new self();
    }
}
