protected function addTranslation($string, array $translations, $file)
    {
        if ($this->prepared && !isset($this->written[$file][$string]) && !empty($this->context)) {

            $data = array($string);

            if (isset($translations[$string][0]) && $translations[$string][0] !== '') {
                $data = $translations[$string];
                array_unshift($data, $string);
            }

            gplcart_file_csv($file, $data);
            $this->written[$file][$string] = true;
        }
    }
protected function addTranslation($string, array $translations, $file)
    {
        if ($this->prepared && !isset($this->written[$file][$string]) && !empty($this->context)) {

            $data = array($string);

            if (isset($translations[$string][0]) && $translations[$string][0] !== '') {
                $data = $translations[$string];
                array_unshift($data, $string);
            }

            gplcart_file_csv($file, $data);
            $this->written[$file][$string] = true;
        }
    }
protected function addTranslation ( $ string , array $ translations , $ file ) { if ( $ this -> prepared && ! isset ( $ this -> written [ $ file ] [ $ string ] ) && ! empty ( $ this -> context ) ) { $ data = array ( $ string ) ; if ( isset ( $ translations [ $ string ] [ 0 ] ) && $ translations [ $ string ] [ 0 ] !== '' ) { $ data = $ translations [ $ string ] ; array_unshift ( $ data , $ string ) ; } gplcart_file_csv ( $ file , $ data ) ; $ this -> written [ $ file ] [ $ string ] = true ; } }
Append the string to the translation file
@param string $string
@param array $translations
@param string $file
Append the string to the translation file