code: static public function setLocale($locale) {
          static::_protect();
          \LanguageDetector::apply($locale);
          \LanguageDetector::addCookieToQueue(\App::getLocale());
          Column::setValidationErrorsMessages((array)static::transGeneral('form.message.column_validation_errors') ?: []);
      }
docs: Change locale inside CMF/CMS area
  @param string $locale