Note: You are currently viewing documentation for Moodle 3.11. Up-to-date documentation for the latest stable version of Moodle may be available here: Language settings.

Language settings: Difference between revisions

From MoodleDocs
m (clean up, typos fixed: dispaly → display, eg, → e.g., (2))
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Language}}
{{Language}}


===Language selection priority===
==Set your preferred language==


This figure shows Moodle priority when selecting languages:
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


[[File:mdl_lang_selection_priority.png|640px|Moodle language selection priority]]
==Set a course language==


==User profile settings==
If the administrator has enabled other languages on the site,  you the teacher can force a language from Edit settings > Force language in your course.


A user can set their preferred language for the site in ''Administration > My profile settings > Edit profile''.
If needed, administrators can allow the capability [[Capabilities/moodle/site:forcelanguage|moodle/site:forcelanguage]] to a course participant who needs to override this forced language.


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


A Manager or Teacher can force the language of their course in ''Course administration > Edit settings > Force language''. This list will show all installed language packs unless the site administrator has limited these in ''Site administration > Languages > Language settings > Languages on language menu'' in which case it will show only that list.
===Force the site language===


The capability [[Capabilities/moodle/site:forcelanguage|moodle/site:forcelanguage]] may be allowed by the admin for users who need to override this language (for example, when testing problems in a course in a language they do not know.)
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 > Language > Language settings > Language autodetect.


==Site administration settings==
===Default language===


There are a number of language settings for administrators in ''Administration > Site administration > Language > Language settings''.
From  Site administration > Language > 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.
 
===Language autodetect===
 
By default, Moodle detects a user's language from their browser setting. However, language auto-detection may be disabled so that the default site language is used instead.
 
===Default language===


This sets the default language for the site. This setting can be overridden by users using the language menu or the setting in their user profile.
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.


Note: If a preferred language is set in your browser then this will override the default site language (unless language auto-detection is disabled).
The priority of language selection from site to course to user can be seen in this graphic:  [https://docs.moodle.org/en/File:mdl_lang_selection_priority.png Language selection priority]


You can enable localised error messages for database connection problems by add the following line to your [[Configuration file|config.php file]]:
You can enable localised error messages for database connection problems by add the following line to your [[Configuration file|config.php file]]:
Line 37: Line 32:
===Display language menu===
===Display language menu===


This sets whether the language menu is displayed on the login page and the home page. If this is turned off, the only places where a user can change the language setting is in their user profile or in the course settings if they are a teacher.
If you don't want the language menu to display, then turn it off from Site administration > Language > Language settings.  Note that the language menu displays differently according to the site theme.
In the  Boost theme, it appears in the top bar on the upper left of the screen, to the right of any theme custom menu items.


===Languages on the language menu===
[[File:LanguageMenu.png]]


If you want to limit the number of languages students and teachers can select from, enter a reduced list here. This should be in the form of the language codes separated by commas, for instance, en_us,es_mx,fr,fr_ca.
===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 > Language > 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.




===Cache language menu===
If your site uses a [[Language packs#Parent language packs and child language packs|child language that relies in a parent language]], you can edit 'Languages on language menu' in Site Administration > Language > Language settings, 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.


The cache is automatically refreshed when you install or delete a language pack via the in-built language packs management tool. If you install a new language pack manually, you have to use Purge all caches feature to refresh the cached list.
===Sitewide locale===


===Cache all language strings===
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). 


Caches all the language strings into compiled files in the data directory.
See [https://docs.microsoft.com/en-us/windows/desktop/intl/language-identifier-constants-and-strings official MS-Windows locale language identifiers]


If you are translating Moodle or changing strings in the Moodle source code then you may want to switch this off. Otherwise always leave this enabled for normal, production sites. Turning it off will force the server to go to disk to read all the language strings for each user session, which will impact performance.
The links to [http://www.shellhacks.com/en/HowTo-Change-Locale-Language-and-Character-Set-in-Linux here for Linux locale info] or [http://msdn.microsoft.com/en-us/goglobal/bb688174.aspx here for Windows server locale info] no longer seem to work :(


===Sitewide locale===
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.
 
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 (eg for linux en_US.UTF-8 or es_ES.UTF-8).  See [http://www.shellhacks.com/en/HowTo-Change-Locale-Language-and-Character-Set-in-Linux for Linux locale info] or [http://msdn.microsoft.com/en-us/goglobal/bb688174.aspx for Windows server locale info].
 
In most cases this field should be left blank as Moodle will use the locale of the server.


===Excel encoding===
===Excel encoding===
Line 65: Line 58:
Leave as default (Unicode) unless you have a particular reason for wanting Latin encoding.
Leave as default (Unicode) unless you have a particular reason for wanting Latin encoding.


==See also==
 
*[http://youtu.be/0v72GKn2Wuk Moodle 2 Language Administration settings]  MoodleBites video on YouTube 


[[fr:Réglages langue]]
[[fr:Réglages langue]]
[[de:Spracheinstellungen]]
[[de:Spracheinstellungen]]
[[es:Configuraciones del idioma]]
[[es:Configuraciones del idioma]]

Latest revision as of 16:03, 15 February 2022


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 from Edit settings > Force language in your course.

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 > Language >Language packs and then view or modify the default language settings from Site administration > Language > 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 > Language > Language settings > Language autodetect.

Default language

From Site administration > Language > 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.

The priority of language selection from site to course to user can be seen in this graphic: Language selection priority

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

$CFG->lang="yourlangcode";

Display language menu

If you don't want the language menu to display, then turn it off from Site administration > Language > Language settings. Note that the language menu displays differently according to the site theme. In the Boost theme, it appears in the top bar on the upper left of the screen, to the right of any theme custom menu items.

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 > Language > 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' in Site Administration > Language > Language settings, 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

The links to here for Linux locale info or here for Windows server locale info no longer seem to work :(

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.

Excel encoding

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