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);
    }