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

Language settings: Difference between revisions

From MoodleDocs
(copied from 2.9 page)
 
(11 intermediate revisions by one other user not shown)
Line 3: Line 3:
===Language selection priority===
===Language selection priority===


This figure shows Moodle priority when selecting languages:
This figure shows Moodle priority when selecting languages and should help you understand the relationship of the various settings for Site, Course, and User.


[[File:mdl_lang_selection_priority.png|640px|Moodle language selection priority]]
[[File:mdl_lang_selection_priority.png|640px|Moodle language selection priority]]
Line 9: Line 9:
==User profile settings==
==User profile settings==


A user can set their preferred language for the site in ''Administration > My profile settings > Edit profile''.
A user can set their preferred language for the site in ''Administration > My profile settings > Edit profile > Preferred 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.


==Course administration settings==
==Course administration 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.
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.


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.)
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.)
Line 19: Line 23:
==Site administration settings==
==Site administration settings==


Default language settings for a site are in ''Site administration > Language > Language settings''. Note that some settings on this page such will only operate on the language packs already installed in the site, so you may need to install languages packs first.
Default language settings for a site are in ''Site administration > Language > Language settings''.  
 
Note that some settings on this page such will only operate on the language packs already installed in the site, so you may need to install languages packs first.


===Language autodetect===
===Language autodetect===
Line 29: Line 35:
This sets the default language for the site. All newly created user accounts will inherit this language as their default, unless you explicitly assign a user another one during account creation.
This sets the default language for the site. All newly created user accounts will inherit this language as their default, unless you explicitly assign a user another one during account creation.


Changing this default does not change the default language of already existing users. See  
Changing this default does not change the default language of already existing users. See [https://docs.moodle.org/28/en/Language_FAQ#When_I_change_to_a_new_default_language.2C_users_still_have_the_old_language. here for how to work around this].


This setting can be overridden by users using the language menu or the setting in their user profile, though you can limit what languages they can choose  
This setting can be overridden by users using the language menu or the setting in their user profile, though you can limit what languages they can choose using the ''Language settings > Languages on language menu'' list.


Note: If a preferred language is set in your browser then this will override the default site language (unless language auto-detection is disabled).
If a preferred language is set in your browser then this will override the default site language (unless language auto-detection is disabled).


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 42: Line 48:


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.
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.
Note: the location or even presence or absence of this language menu is theme dependent. In the 2.8 default theme of Clean, it appears in the Navigation bar on the upper left of the screen, to the right of any theme custom menu items. In older Moodle themes, it often appeared on the upper right next to the "Logged in as user" link.
[[File:cleanthemelanguageselector.png]]


===Languages on the language menu===
===Languages on the language menu===
Line 47: Line 57:
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.
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.


This list controls the possible options that will be available both on the Course level with the ''Force language'' setting and in User Profiles with the ''Preferred language'' setting.


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; eg, if you are in Canada and you want your users to use Canadian French but not the original French language. 


===Cache language menu===
===Cache language menu===
Line 61: Line 73:
===Sitewide locale===
===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 (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].
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 here for Linux locale info] or [http://msdn.microsoft.com/en-us/goglobal/bb688174.aspx here for Windows server locale info].


In most cases this field should be left blank as Moodle will use the locale of the server.
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===
===Excel encoding===

Latest revision as of 15:33, 15 October 2015


Language selection priority

This figure shows Moodle priority when selecting languages and should help you understand the relationship of the various settings for Site, Course, and User.

Moodle language selection priority

User profile settings

A user can set their preferred language for the site in Administration > My profile settings > Edit profile > Preferred 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.

Course administration 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.

The capability 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.)

Site administration settings

Default language settings for a site are in Site administration > Language > Language settings.

Note that some settings on this page such will only operate on the language packs already installed in the site, so you may need to install languages packs first.

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. All newly created user accounts will inherit this language as their default, unless you explicitly assign a user another one during account creation.

Changing this default does not change the default language of already existing users. See here for how to work around this.

This setting can be overridden by users using the language menu or the setting in their user profile, though you can limit what languages they can choose using the Language settings > Languages on language menu list.

If a preferred language is set in your browser then this will override the default site language (unless language auto-detection is disabled).

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

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.

Note: the location or even presence or absence of this language menu is theme dependent. In the 2.8 default theme of Clean, it appears in the Navigation bar on the upper left of the screen, to the right of any theme custom menu items. In older Moodle themes, it often appeared on the upper right next to the "Logged in as user" link.

cleanthemelanguageselector.png

Languages on the language menu

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.

This list controls the possible options that will be available both on the Course level with the Force language setting and in User Profiles with the Preferred language setting.

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; eg, if you are in Canada and you want your users to use Canadian French but not the original French language.

Cache language menu

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.

Cache all language strings

Caches all the language strings into compiled files in the data directory.

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.

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 (eg for linux en_US.UTF-8 or es_ES.UTF-8). See here for Linux locale info or here for Windows server locale info.

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.

See also