<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Translation extends BaseModel
{
    const Languages = [
        'en' => 'English',
        'fa' => 'Farsi',
    ];

    public function GetLanguage($translate = true): string
    {
        $lang = self::Languages[$this->lang];
        return $translate ? translate($lang) : $lang;
    }
}
