Skip to content

Instantly share code, notes, and snippets.

@kylekatarnls
Last active February 27, 2019 07:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylekatarnls/87c1fe410dfbe0f63292d2d24b21ff54 to your computer and use it in GitHub Desktop.
Save kylekatarnls/87c1fe410dfbe0f63292d2d24b21ff54 to your computer and use it in GitHub Desktop.
Carbon translators

Thanks to people helping us to translate Carbon in so many languages

List from 2019-02-27, you can get an updated list by running the following code:

$authors = [];
foreach (glob(\Carbon\Translator::get()->getDirectories()[0].'/*.php') as $file) {
  if (preg_match('/\* Authors:([\s\S]+)\*\//U', file_get_contents($file), $match)) {
    foreach (explode('* -', $match[1]) as $line) {
      $line = trim($line);
      if ($line !== '') {
        $authors[$line] = true;
      }
    }
  }
}

$authors = array_keys($authors);
sort($authors);

echo implode("\n", $authors);

If somone is missing, please let a comment.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment