code: protected function getResourceLocale(ResourceInterface $resource)
      {
          $sys = $resource->getSystemProperties();
  
          return $sys instanceof LocalizedResourceSystemProperties
              ? $sys->getLocale()
              : null;
      }
docs: @param ResourceInterface $resource
  
  @return string|null