<?php

/**
 * Created by PhpStorm.
 * User: Pablo García Sanz
 * Date: 26/08/2017
 * Time: 17:45
 */
class HeaderLanguage
{
    private $language;
    private $CI;

    public function __construct()
    {

        $this->CI = get_instance();
        $this->language = $this->CI->session->userdata('language');
        $this->CI->load->language('navbar_lang', $this->language);
    }

    /**
     * Devuelve el texto en funcion del idioma
     * @return Texto[]
     */
    public function getNavBarText() {

        $data['nav_referees'] = $this -> CI->lang->line('nav_referees');
        $data['nav_competitors'] =  $this -> CI->lang->line('nav_competitors');
        $data['nav_competitions'] =  $this -> CI->lang->line('nav_competitions');
        $data['nav_user'] =  $this -> CI->lang->line('nav_user');
        $data['nav_timekeeper'] = $this -> CI -> lang -> line ('nav_timekeeper');

        $data['nav_competitors_create'] =  $this -> CI->lang->line('nav_competitors_create');
        $data['nav_competitors_view'] =  $this -> CI->lang->line('nav_competitors_view');
        $data['nav_referees_create'] =  $this -> CI->lang->line('nav_referees_create');
        $data['nav_referees_view'] =  $this -> CI->lang->line('nav_referees_view');
        $data['nav_user_close_session'] =  $this -> CI->lang->line('nav_user_close_session');
        $data['nav_user_settings'] =  $this -> CI->lang->line('nav_user_settings');
        $data['nav_teams'] =  $this -> CI->lang->line('nav_teams');

        $data['nav_tooltip_competiton'] =  $this -> CI->lang->line('nav_tooltip_competiton');
        $data['nav_tooltip_teams'] =  $this -> CI->lang->line('nav_tooltip_teams');
        $data['nav_tooltip_referees'] =  $this -> CI->lang->line('nav_tooltip_referees');
        $data['nav_tooltip_competitors'] =  $this -> CI->lang->line('nav_tooltip_competitors');
        $data['nav_tooltip_timekeeper'] =  $this -> CI->lang->line('nav_tooltip_timekeeper');

        $data['confirm_close_session'] =  $this -> CI->lang->line('confirm_close_session');


        return $data;
    }


}