src/Charcoal/Admin/Script/Translation/TranslateScript.php
public function locales()
    {
        if ($this->locales) {
            return $this->locales;
        }

        $cfg = $this->app()->config();
        $locales = isset($cfg['locales']) ? $cfg['locales'] : [];
        $languages = isset($locales['languages']) ? $locales['languages'] : [];
        $file = isset($locales['file']) ? $locales['file'] : $this->argOrInput('output');
        // Default to FR
        $default = isset($locales['default_language']) ? $locales['default_language'] : 'fr';

        $this->locales = [
            'languages' => $languages,
            'file' => $file,
            'default_language' => $default
        ];
        return $this->locales;
    }
public function locales()
    {
        if ($this->locales) {
            return $this->locales;
        }

        $cfg = $this->app()->config();
        $locales = isset($cfg['locales']) ? $cfg['locales'] : [];
        $languages = isset($locales['languages']) ? $locales['languages'] : [];
        $file = isset($locales['file']) ? $locales['file'] : $this->argOrInput('output');
        // Default to FR
        $default = isset($locales['default_language']) ? $locales['default_language'] : 'fr';

        $this->locales = [
            'languages' => $languages,
            'file' => $file,
            'default_language' => $default
        ];
        return $this->locales;
    }
public function locales ( ) { if ( $ this -> locales ) { return $ this -> locales ; } $ cfg = $ this -> app ( ) -> config ( ) ; $ locales = isset ( $ cfg [ 'locales' ] ) ? $ cfg [ 'locales' ] : [ ] ; $ languages = isset ( $ locales [ 'languages' ] ) ? $ locales [ 'languages' ] : [ ] ; $ file = isset ( $ locales [ 'file' ] ) ? $ locales [ 'file' ] : $ this -> argOrInput ( 'output' ) ; // Default to FR $ default = isset ( $ locales [ 'default_language' ] ) ? $ locales [ 'default_language' ] : 'fr' ; $ this -> locales = [ 'languages' => $ languages , 'file' => $ file , 'default_language' => $ default ] ; return $ this -> locales ; }
Locales set in config.json
Expects languages | file | default_language

@return array
Locales set in config . json Expects languages | file | default_language