protected function getTranslationPathBaseDirectory($base, $lang = null)
    {
        if (empty($lang)) {
            $lang = $this->getLanguage();
        }

        if (!empty($this->pluginName)) {

            if ($base == 'tmp') {
                return sprintf('%s/plugins/%s/lang/%s.json', StaticContainer::get('path.tmp'), $this->pluginName, $lang);
            } else {
                return sprintf('%s/lang/%s.json', Manager::getPluginDirectory($this->pluginName), $lang);
            }
        }

        if ($base == 'tmp') {
            return sprintf('%s/%s.json', StaticContainer::get('path.tmp'), $lang);
        }

        return sprintf('%s/%s/%s.json', PIWIK_INCLUDE_PATH, $base, $lang);
    }
protected function getTranslationPathBaseDirectory($base, $lang = null)
    {
        if (empty($lang)) {
            $lang = $this->getLanguage();
        }

        if (!empty($this->pluginName)) {

            if ($base == 'tmp') {
                return sprintf('%s/plugins/%s/lang/%s.json', StaticContainer::get('path.tmp'), $this->pluginName, $lang);
            } else {
                return sprintf('%s/lang/%s.json', Manager::getPluginDirectory($this->pluginName), $lang);
            }
        }

        if ($base == 'tmp') {
            return sprintf('%s/%s.json', StaticContainer::get('path.tmp'), $lang);
        }

        return sprintf('%s/%s/%s.json', PIWIK_INCLUDE_PATH, $base, $lang);
    }
protected function getTranslationPathBaseDirectory ( $ base , $ lang = null ) { if ( empty ( $ lang ) ) { $ lang = $ this -> getLanguage ( ) ; } if ( ! empty ( $ this -> pluginName ) ) { if ( $ base == 'tmp' ) { return sprintf ( '%s/plugins/%s/lang/%s.json' , StaticContainer :: get ( 'path.tmp' ) , $ this -> pluginName , $ lang ) ; } else { return sprintf ( '%s/lang/%s.json' , Manager :: getPluginDirectory ( $ this -> pluginName ) , $ lang ) ; } } if ( $ base == 'tmp' ) { return sprintf ( '%s/%s.json' , StaticContainer :: get ( 'path.tmp' ) , $ lang ) ; } return sprintf ( '%s/%s/%s.json' , PIWIK_INCLUDE_PATH , $ base , $ lang ) ; }
Get translation file path based on given params

@param string $base Optional base directory (either 'lang' or 'tmp')
@param string|null $lang forced language
@throws \Exception
@return string path
Get translation file path based on given params