#Fixed 10: Configurar el idioma de PHP en español en Ubuntu

setlocale(LC_ALL, 'es_ES');

Configurar idiomas del sistema

  • En primer lugar seleccionas los idiomas que quieres instalar
  • En segundo lugar seleccionas el idioma que quieres por defecto en el entorno del sistema.
root@vmixxxxx:~# dpkg-reconfigure locales
Generating locales (this might take a while)...
en_AG.UTF-8... done
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8... done
en_GB.UTF-8... done
en_HK.UTF-8... done
en_IE.UTF-8... done
en_IL.UTF-8... done
en_IN.UTF-8... done
en_NG.UTF-8... done
en_NZ.UTF-8... done
en_PH.UTF-8... done
en_SG.UTF-8... done
en_US.UTF-8... done
en_ZA.UTF-8... done
en_ZM.UTF-8... done
en_ZW.UTF-8... done
es_ES.UTF-8... done
Generation complete.

Reiniciar Apache

~#sudo service apache2 restart
setlocale(LC_ALL, 'es_ES.UTF-8');

--

--

--

Dad and developer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Manu Pijierro

Manu Pijierro

Dad and developer

More from Medium

How to Add and Delete Rows Dynamically using jQuery

How to Add and Delete Rows Dynamically using jQuery

Laravel resizes all images in a folder

How to Create Table Using Laravel Migration?

No More MVC — Organize Big Projects In Laravel PHP