You are here

public function ImagemagickExecManager::getInstalledLocales in ImageMagick 8.2

Same name and namespace in other branches
  1. 8.3 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 449

Class

ImagemagickExecManager
Manage execution of ImageMagick/GraphicsMagick commands.

Namespace

Drupal\imagemagick

Code

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