You are here

public function ImagemagickExecManager::getInstalledLocales in ImageMagick 8.3

Same name and namespace in other branches
  1. 8.2 src/ImagemagickExecManager.php \Drupal\imagemagick\ImagemagickExecManager::getInstalledLocales()

Gets the list of locales installed on the server.

Return value

string The string resulting from the execution of 'locale -a' in *nix systems.

File

src/ImagemagickExecManager.php, line 405

Class

ImagemagickExecManager
Manage execution of ImageMagick/GraphicsMagick commands.

Namespace

Drupal\imagemagick

Code

public function getInstalledLocales() : string {
  $output = '';
  if ($this->isWindows === FALSE) {
    $this
      ->runOsShell('locale', '-a', 'locale', $output);
  }
  else {
    $output = (string) $this
      ->t("List not available on Windows servers.");
  }
  return $output;
}