public function ShellManager::getInstalledLocales in FillPDF 5.0.x
Same name and namespace in other branches
- 8.4 src/ShellManager.php \Drupal\fillpdf\ShellManager::getInstalledLocales()
Gets the list of locales installed on the server.
Return value
string[] Associative array of installed locales as returned by 'locale -a' on *nix systems, keyed by itself. Will return an empty array on Windows servers.
Overrides ShellManagerInterface::getInstalledLocales
File
- src/
ShellManager.php, line 49
Class
- ShellManager
- Manage execution of shell commands.
Namespace
Drupal\fillpdfCode
public function getInstalledLocales() {
if ($this
->isWindows()) {
return [];
}
$output = [];
$status = NULL;
exec("locale -a", $output, $status);
return array_combine($output, $output);
}