public function set(string $locale, string $collate): bool {
    $auth = false;
    try {
      if (!empty($locale)) {
        $_locale = preg_replace("/^(\w{2})-(\w{2})$/", "$1_$2", $locale);
        locale_set_default($_locale);
        if (!empty($collate)) {
          $_locale .= "." . strtoupper($collate);
        }
        setlocale(LC_ALL, $_locale);
        $auth = true;
      }
    } catch (Exception $ex) {
      $auth = false;
      throw $ex;
    }
    return $auth;
  }