I have done this successfully in the past and I cannot get it to work now. I am running Moodle version 3.0.1 Build 20151221 and trying to access the Language pack for editing. It attempts to load and I get an error message "Error writing to the database". When I pull PHP error logs, I get the following message:
[27-Oct-2016 09:34:30 America/Phoenix] Default exception handler: Error writing to database Debug: Duplicate entry 'en-426-onthismoodlefrom' for key 'mdl_toolcust_lancomstr_uix'
INSERT INTO mdl_tool_customlang (lang,componentid,stringid,original,master,timemodified,outdated,local,timecustomized) VALUES(?,?,?,?,?,?,?,?,?)
[array (
0 => 'en',
1 => '426',
2 => 'onthismoodlefrom',
3 => ' here since ',
4 => ' here since ',
5 => 1477586070,
6 => 0,
7 => NULL,
8 => NULL,
)]
Error code: dmlwriteexception
* line 446 of \lib\dml\moodle_database.php: dml_write_exception thrown
* line 1164 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1210 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 186 of \admin\tool\customlang\locallib.php: call to mysqli_native_moodle_database->insert_record()
* line 60 of \admin\tool\customlang\index.php: call to tool_customlang_utils::checkout()
Please help.