original_string: protected function getValidEditorLang()
      {
          $locale = App::getLocale();
  
          // English is baked in
          if ($locale == 'en') {
              return null;
          }
  
          $locale = str_replace('-', '_', strtolower($locale));
          $path = base_path('modules/backend/formwidgets/richeditor/assets/vendor/froala/js/languages/'.$locale.'.js');
  
          return File::exists($path) ? $locale : false;
      }
code: protected function getValidEditorLang()
      {
          $locale = App::getLocale();
  
          // English is baked in
          if ($locale == 'en') {
              return null;
          }
  
          $locale = str_replace('-', '_', strtolower($locale));
          $path = base_path('modules/backend/formwidgets/richeditor/assets/vendor/froala/js/languages/'.$locale.'.js');
  
          return File::exists($path) ? $locale : false;
      }
code_tokens: protected function getValidEditorLang ( ) { $ locale = App :: getLocale ( ) ; // English is baked in if ( $ locale == 'en' ) { return null ; } $ locale = str_replace ( '-' , '_' , strtolower ( $ locale ) ) ; $ path = base_path ( 'modules/backend/formwidgets/richeditor/assets/vendor/froala/js/languages/' . $ locale . '.js' ) ; return File :: exists ( $ path ) ? $ locale : false ; }
docstring: Returns a valid language code for Redactor.
  @return string|mixed
docstring_tokens: Returns a valid language code for Redactor .