Installing Locale

Installing Locale

by Keith Sorbo -
Number of replies: 1

I have read many different posts and tried many different things, but cannot get day-of-week and month names to translate into Indonesian.

Here is what I have done:

  1. In ubuntu (20.04) installed locale id_ID.utf8 
  2. In ubuntu set LANG="id_ID.UTF-8"
  3. In moodle set default language to $CFG->lang='id';
    NOTE, if I set language default in config.php to id_ID or id_ID.utf-8, I get error "Invalid current value" in the Admin->Language configuration page.  
  4. The MOODLEDATA/lang/ folder, contains subfolder 'id' where the Indonesian language files are located. (I am curious why the folder is id not id_ID or id_ID.utf-8??) I installed en_US and the folder name here is en_US. 
  5. MOODLEDATA/lang/id/langconfig.php has this line.
  6. $string['locale'] = 'id_ID.UTF-8';

This seems to incorporate all postings about this topic I have found. I don't know where else to look or what else to try. 

The only thing that comes to mind is that somehow there is a disconnect between the way the Indonesian langauge pack is named "id" with the locale I have installed "id_ID.utf-8"

Average of ratings: -
In reply to Keith Sorbo

Re: Installing Locale

by Keith Sorbo -
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.
Average of ratings: Useful (1)