public function createJsTranslation($content, $langcode = null)
    {
        $extracted = $this->parseJs($content);

        if (empty($extracted)) {
            return false;
        }

        $file = $this->getContextJsFile($langcode);
        $translations = $this->loadTranslation($this->getCommonFile($langcode));

        foreach ($extracted as $string) {
            $this->addTranslation($string, $translations, $file);
        }

        return true;
    }
public function createJsTranslation($content, $langcode = null)
    {
        $extracted = $this->parseJs($content);

        if (empty($extracted)) {
            return false;
        }

        $file = $this->getContextJsFile($langcode);
        $translations = $this->loadTranslation($this->getCommonFile($langcode));

        foreach ($extracted as $string) {
            $this->addTranslation($string, $translations, $file);
        }

        return true;
    }
public function createJsTranslation ( $ content , $ langcode = null ) { $ extracted = $ this -> parseJs ( $ content ) ; if ( empty ( $ extracted ) ) { return false ; } $ file = $ this -> getContextJsFile ( $ langcode ) ; $ translations = $ this -> loadTranslation ( $ this -> getCommonFile ( $ langcode ) ) ; foreach ( $ extracted as $ string ) { $ this -> addTranslation ( $ string , $ translations , $ file ) ; } return true ; }
Creates context JS translation
@param string $content
@param string|null $langcode
@return boolean
Creates context JS translation