You are here

function _locale_translation_file_is_remote in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/locale/locale.translation.inc \_locale_translation_file_is_remote()
  2. 10 core/modules/locale/locale.translation.inc \_locale_translation_file_is_remote()

Determine if a file is a remote file.

Parameters

string $uri: The URI or URI pattern of the file.

Return value

bool TRUE if the $uri is a remote file.

1 call to _locale_translation_file_is_remote()
locale_translation_source_build in core/modules/locale/locale.translation.inc
Builds abstract translation source.

File

core/modules/locale/locale.translation.inc, line 382
Common API for interface translation.

Code

function _locale_translation_file_is_remote($uri) {
  $scheme = StreamWrapperManager::getScheme($uri);
  if ($scheme) {
    return !\Drupal::service('file_system')
      ->realpath($scheme . '://');
  }
  return FALSE;
}