Last active
March 13, 2024 05:52
-
-
Save hurie/7130629 to your computer and use it in GitHub Desktop.
Set locale for Indonesian on all platform (Windows, Linux and others Nix server)credit for buana95 at yahoo dot com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
setlocale(LC_ALL, | |
'id_ID.UTF8', 'id_ID.UTF-8', 'id_ID.8859-1', 'id_ID', | |
'IND.UTF8', 'IND.UTF-8', 'IND.8859-1', 'IND', | |
'Indonesian.UTF8', 'Indonesian.UTF-8', 'Indonesian.8859-1', 'Indonesian', 'Indonesia', | |
'id', 'ID', | |
// Add english as default (if all Indonesian not available) | |
'en_US.UTF8', 'en_US.UTF-8', 'en_US.8859-1', 'en_US', 'American', 'ENG', 'English', | |
); | |
//will output something like: Minggu, 17 Agustus 2008 | |
echo strftime("%A, %d %B %Y") . "\n"; |
Yeahh boiii 😁👌
You can view a list of available locales with the locale -a
command
Source :
Add another locale if not exist (linux)
Add other locale in docker (linux)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mantab bosskkuuuhhhh