original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Get translation file path based on given params