src/Support/View.php
function i18n($file, $locale = NULL){
        $this->fileName= $file;
        $this->i18nContent= NULL;
        if($locale != NULL){
            if(file_exists(PATHAPP . 'src/content/' . $file . "_$locale" . '.txt')){
                $this->i18nContent= \E_fn\load_application_file('src/content/' . $file . "_$locale" . '.txt');
                $this->i18nContent= \E_fn\parse_properties($this->i18nContent);
                $this->locale= $locale;
            }
        }
        if($this->i18nContent == NULL){
            $this->i18nContent= \E_fn\load_application_file('src/content/' . $file . '.txt');
            $this->i18nContent= \E_fn\parse_properties($this->i18nContent);
            $this->locale= 'Default';
        }
    }
function i18n($file, $locale = NULL){
        $this->fileName= $file;
        $this->i18nContent= NULL;
        if($locale != NULL){
            if(file_exists(PATHAPP . 'src/content/' . $file . "_$locale" . '.txt')){
                $this->i18nContent= \E_fn\load_application_file('src/content/' . $file . "_$locale" . '.txt');
                $this->i18nContent= \E_fn\parse_properties($this->i18nContent);
                $this->locale= $locale;
            }
        }
        if($this->i18nContent == NULL){
            $this->i18nContent= \E_fn\load_application_file('src/content/' . $file . '.txt');
            $this->i18nContent= \E_fn\parse_properties($this->i18nContent);
            $this->locale= 'Default';
        }
    }
function i18n ( $ file , $ locale = NULL ) { $ this -> fileName = $ file ; $ this -> i18nContent = NULL ; if ( $ locale != NULL ) { if ( file_exists ( PATHAPP . 'src/content/' . $ file . "_$locale" . '.txt' ) ) { $ this -> i18nContent = \ E_fn \ load_application_file ( 'src/content/' . $ file . "_$locale" . '.txt' ) ; $ this -> i18nContent = \ E_fn \ parse_properties ( $ this -> i18nContent ) ; $ this -> locale = $ locale ; } } if ( $ this -> i18nContent == NULL ) { $ this -> i18nContent = \ E_fn \ load_application_file ( 'src/content/' . $ file . '.txt' ) ; $ this -> i18nContent = \ E_fn \ parse_properties ( $ this -> i18nContent ) ; $ this -> locale = 'Default' ; } }
Carga un archivo de internacionalizacion. Si no se especifica el locale carga el archivo por defecto, si no
le agrega el locale pasado como parametro
@param string $file
@param string $locale
Carga un archivo de internacionalizacion . Si no se especifica el locale carga el archivo por defecto si no le agrega el locale pasado como parametro