diff --git a/src/Utils/TranslatorManager.php b/src/Utils/TranslatorManager.php index d0c5fcc..444f666 100644 --- a/src/Utils/TranslatorManager.php +++ b/src/Utils/TranslatorManager.php @@ -103,6 +103,10 @@ private function buildCoreLanguageDirectory( $language, $directoryRoot ) { + $output = new ConsoleOutput(); + $input = new ArrayInput([]); + $io = new DrupalStyle($input, $output); + $coreLanguageDirectory = $directoryRoot . sprintf( @@ -126,6 +130,12 @@ private function buildCoreLanguageDirectory( if (!isset($languageDirectory)) { if ($language == 'en') { throw new \Exception('No languages found. Make sure you have installed a console language package in a supported directory'); + }else{ + $io->warning( + sprintf( + 'Language not available please execute this command in order to get the language locally using composer, run composer require drupal/console-'.$language.'' + ) + ); } return $this->buildCoreLanguageDirectory('en', $directoryRoot); }