Language settings

From MoodleDocs


Set your preferred language

If the administrator has enabled other languages on the site, you can set your preferred one from the User menu (top right) > Preferences > Preferred language.

Set a course language

If the administrator has enabled other languages on the site, you the teacher can force a language in the course settings.

If needed, administrators can allow the capability moodle/site:forcelanguage to a course participant who needs to override this forced language.

Site administration settings

Administrators can install other languages from Site administration > General > Language packs and then view or modify the default language settings from Site administration > General > Language settings.

Force the site language

By default, Moodle detects a user's language from their browser setting. If you as admin want to force the default site language instead, you can disable this from Site administration > General > Language settings > Language autodetect.

Default language

From Site administration > General > Language settings you as admin the default site language and then any accounts you create will use this language, unless you specify a different one.

Changing this default does not change the default language of already existing users. See the FAQ 'When I change to a new default language, users still have the old language.' in Language FAQ for workarounds.

Language selection priority

Display language menu

If you don't want the language menu to display, you can turn it off from Site administration > General > Language settings. Note that the language menu may display differently according to the site theme.

LanguageMenu.png

Limit the languages shown

If as admin you want to limit the number of languages students and teachers can select from, do this from Site administration > General > Language settings > Languages on language menu. Add the codes of the languages you want to display, separated by commas, for instance, en_us,es_mx,fr,fr_ca.

If your site uses a child language that relies in a parent language, you can edit 'Languages on language menu' and remove the parent language; e.g. if you are in Canada and you want your users to use Canadian French but not the original French language.

Sitewide locale

Choose a sitewide locale - this will override the format and language of dates for all language packs (though names of days in calendar are not affected). You need to have this locale data installed on your operating system (e.g. for linux en_US.UTF-8 or es_ES.UTF-8).

See official MS-Windows locale language identifiers

In most cases this field should be left blank unless you are sure what you are doing, as Moodle will use the locale of the server. Warning: You should only enter a UTF-8 locale. Entering a non-UTF-8 locale can cause things on your site can break.

Excel encoding

Leave as default (Unicode) unless you have a particular reason for wanting Latin encoding.

Enable PDF fonts

If your site has courses in languages in such as Chinese, Japanese, Korean, Hebrew or Arabic, to ensure that text displays correctly in downloaded PDF files such as assignment submissions, you can enable PDF fonts.

You'll then need to specify fonts for the languages used on your site in $CFG->pdfexportfont in config.php. These fonts will then be available to select in the new course setting PDF font. (If PDF fonts are not enabled, or if none are specified in config.php, then the course setting PDF font is not shown.)

Enable localised error messages

You can enable localised error messages for database connection problems by add the following line to your config.php file:

$CFG->lang="yourlangcode";