MDL-16348 Reorganise admin tree:
[moodle.git] / admin / settings / language.php
CommitLineData
1ea1bcb3 1<?php // $Id$
2
3// This file defines settingpages and externalpages under the "appearance" category
4
efcc5e0f 5if ($hassiteconfig
e67eff89 6 or has_capability('moodle/site:langeditmaster', $systemcontext)
efcc5e0f 7 or has_capability('moodle/site:langeditlocal', $systemcontext)) { // speedup for non-admins, add all caps used on this page
a559f630 8
220a90c5 9 // "languageandlocation" settingpage
10 $temp = new admin_settingpage('langsettings', get_string('languagesettings', 'admin'));
11 $temp->add(new admin_setting_configcheckbox('autolang', get_string('autolang', 'admin'), get_string('configautolang', 'admin'), 1));
12 $temp->add(new admin_setting_configselect('lang', get_string('lang', 'admin'), get_string('configlang', 'admin'), current_language(), get_list_of_languages())); // $CFG->lang might be set in installer already, default en or en_utf8 is in setup.php
13 $temp->add(new admin_setting_configcheckbox('langmenu', get_string('langmenu', 'admin'), get_string('configlangmenu', 'admin'), 1));
14 $temp->add(new admin_setting_langlist());
15 $temp->add(new admin_setting_configcheckbox('langcache', get_string('langcache', 'admin'), get_string('configlangcache', 'admin'), 1));
16 $temp->add(new admin_setting_configtext('locale', get_string('localetext', 'admin'), get_string('configlocale', 'admin'), '', PARAM_FILE));
220a90c5 17 $temp->add(new admin_setting_configselect('latinexcelexport', get_string('latinexcelexport', 'admin'), get_string('configlatinexcelexport', 'admin'), '0', array('0'=>'Unicode','1'=>'Latin')));
195e90f9 18
220a90c5 19 $ADMIN->add('language', $temp);
1ea1bcb3 20
e67eff89 21 $ADMIN->add('language', new admin_externalpage('langedit', get_string('langedit', 'admin'), "$CFG->wwwroot/$CFG->admin/lang.php", array('moodle/site:langeditmaster', 'moodle/site:langeditlocal') ));
220a90c5 22 $ADMIN->add('language', new admin_externalpage('langimport', get_string('langpacks', 'admin'), "$CFG->wwwroot/$CFG->admin/langimport.php"));
1ea1bcb3 23
b032b490 24 // Hidden multilang upgrade page.
25 $ADMIN->add('language', new admin_externalpage('multilangupgrade', get_string('multilangupgrade', 'admin'), $CFG->wwwroot.'/'.$CFG->admin.'/multilangupgrade.php', 'moodle/site:config', !empty($CFG->filter_multilang_converted)));
26
a559f630 27} // end of speedup
28
1ea1bcb3 29?>