classes/Input/Localize.php
public function hidden()
    {
        $class = $this->model; // Must be a local var to test

        // There aren't multiple locales specified
        if (count(config('decoy.site.locales')) <= 1 ) return true;

        // We're editing a model with no locale attribute
        if ($this->item && !$this->item->locale) return true;

        // The model was explicitly disabled
        if ($class::$localizable === false ) return true;

        // Auto localize is turned on and we're on a child model
        if (config('decoy.site.auto_localize_root_models')
            && app('decoy.wildcard')->detectParent()) return true;

        // If auto-localizeable is turned off and this model doesn't have it
        // turned on
        if (!config('decoy.site.auto_localize_root_models')
            && !$class::$localizable) return true;

        // Otherwise, allow localization
        return false;
    }
public function hidden()
    {
        $class = $this->model; // Must be a local var to test

        // There aren't multiple locales specified
        if (count(config('decoy.site.locales')) <= 1 ) return true;

        // We're editing a model with no locale attribute
        if ($this->item && !$this->item->locale) return true;

        // The model was explicitly disabled
        if ($class::$localizable === false ) return true;

        // Auto localize is turned on and we're on a child model
        if (config('decoy.site.auto_localize_root_models')
            && app('decoy.wildcard')->detectParent()) return true;

        // If auto-localizeable is turned off and this model doesn't have it
        // turned on
        if (!config('decoy.site.auto_localize_root_models')
            && !$class::$localizable) return true;

        // Otherwise, allow localization
        return false;
    }
public function hidden ( ) { $ class = $ this -> model ; // Must be a local var to test // There aren't multiple locales specified if ( count ( config ( 'decoy.site.locales' ) ) <= 1 ) return true ; // We're editing a model with no locale attribute if ( $ this -> item && ! $ this -> item -> locale ) return true ; // The model was explicitly disabled if ( $ class :: $ localizable === false ) return true ; // Auto localize is turned on and we're on a child model if ( config ( 'decoy.site.auto_localize_root_models' ) && app ( 'decoy.wildcard' ) -> detectParent ( ) ) return true ; // If auto-localizeable is turned off and this model doesn't have it // turned on if ( ! config ( 'decoy.site.auto_localize_root_models' ) && ! $ class :: $ localizable ) return true ; // Otherwise, allow localization return false ; }
Check if the localize UI should be displayed

@return boolean
Check if the localize UI should be displayed