original_string: public static function unload($plugin = null)
      {
          if (self::loaded($plugin)) {
              $locales = Configure::read('App.paths.locales');
              foreach ($locales as $key => $path) {
                  if ($path == self::getLocalePath($plugin)) {
                      unset($locales[$key]);
                  }
              }
  
              Configure::write('App.paths.locales', $locales);
          }
  
          parent::unload($plugin);
      }
code: public static function unload($plugin = null)
      {
          if (self::loaded($plugin)) {
              $locales = Configure::read('App.paths.locales');
              foreach ($locales as $key => $path) {
                  if ($path == self::getLocalePath($plugin)) {
                      unset($locales[$key]);
                  }
              }
  
              Configure::write('App.paths.locales', $locales);
          }
  
          parent::unload($plugin);
      }
code_tokens: public static function unload ( $ plugin = null ) { if ( self :: loaded ( $ plugin ) ) { $ locales = Configure :: read ( 'App.paths.locales' ) ; foreach ( $ locales as $ key => $ path ) { if ( $ path == self :: getLocalePath ( $ plugin ) ) { unset ( $ locales [ $ key ] ) ; } } Configure :: write ( 'App.paths.locales' , $ locales ) ; } parent :: unload ( $ plugin ) ; }
docstring: Unload the plugin.
  
  @param null|string $plugin
  @return void
docstring_tokens: Unload the plugin .