public function createNewLanguage(string $newLocale)
    {
        if (count($this->getAvailableLanguages()) >= $this->allowedLanguages) {
            throw new DirectoryNotCreatedException("Max number of allowed languages alread reached.");
        }

        if (!$this->fileSystem->makeDirectory($this->getLanguagesPath() . DIRECTORY_SEPARATOR . $newLocale)) {
            throw new DirectoryNotCreatedException("New directory for locale $newLocale cannot be created.");
        }

        return true;
    }
public function createNewLanguage(string $newLocale)
    {
        if (count($this->getAvailableLanguages()) >= $this->allowedLanguages) {
            throw new DirectoryNotCreatedException("Max number of allowed languages alread reached.");
        }

        if (!$this->fileSystem->makeDirectory($this->getLanguagesPath() . DIRECTORY_SEPARATOR . $newLocale)) {
            throw new DirectoryNotCreatedException("New directory for locale $newLocale cannot be created.");
        }

        return true;
    }
public function createNewLanguage ( string $ newLocale ) { if ( count ( $ this -> getAvailableLanguages ( ) ) >= $ this -> allowedLanguages ) { throw new DirectoryNotCreatedException ( "Max number of allowed languages alread reached." ) ; } if ( ! $ this -> fileSystem -> makeDirectory ( $ this -> getLanguagesPath ( ) . DIRECTORY_SEPARATOR . $ newLocale ) ) { throw new DirectoryNotCreatedException ( "New directory for locale $newLocale cannot be created." ) ; } return true ; }
Create a new directory under the languages directory for input locale.
Return true on success.

@param  string $newLocale

@throws DirectoryNotCreatedException

@return bool
Create a new directory under the languages directory for input locale . Return true on success .