Solved my problem.
It turns out that $CFG->lang must be the same as the folder name of the language pack. (In my case the folder was named id not id_ID or id_ID.utf-8). Else you will get an error.
However, adding
$CFG->locale='id_ID.utf-8'
solves the problem. And the dates render correctly whether English or Indonesian is selected.
It turns out that $CFG->lang must be the same as the folder name of the language pack. (In my case the folder was named id not id_ID or id_ID.utf-8). Else you will get an error.
However, adding
$CFG->locale='id_ID.utf-8'
solves the problem. And the dates render correctly whether English or Indonesian is selected.