Skip to content

Instantly share code, notes, and snippets.

@lucasff
Created July 29, 2014 19:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lucasff/c7c6ec41cf113c4b6cf6 to your computer and use it in GitHub Desktop.
Save lucasff/c7c6ec41cf113c4b6cf6 to your computer and use it in GitHub Desktop.
Force pt_BR locale in PHP
<?php
date_default_timezone_set('America/Sao_Paulo');
setlocale(LC_ALL, 'pt_BR.utf-8', 'ptb', 'pt_BR', 'portuguese-brazil', 'portuguese-brazilian', 'bra', 'brazil', 'br');
setlocale(LC_TIME, 'pt_BR.utf-8', 'ptb', 'pt_BR', 'portuguese-brazil', 'portuguese-brazilian', 'bra', 'brazil', 'br');
@crestinglight
Copy link

Thanks! This is super useful!

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