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

Language FAQ: Difference between revisions

From MoodleDocs
m (Added new text from 2.5 version of page)
m (updated image file)
 
(39 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Language}}
{{Language}}
==Which is the official language for Moodle?==
The [http://lang.moodle.org/mod/forum/discuss.php?d=2617 "official"] language for Moodle is actually the Australian English (''hey mate!'') , which in 100% the same as UK English.


==Where can I set the default language for the site?==
== General ==
 
=== Which is the official language for Moodle? ===
The [http://lang.moodle.org/mod/forum/discuss.php?d=2617 "official"] language for Moodle is actually the Australian English (''hey mate!'') , which in 100% the same as UK English. The default language on a new installation of Moodle, unless you change it, will be this version of English, denoted by the language code "en".
 
=== What do codes like "en" and "en_us"  or "es" and "es_mx" and "es_ve" mean?? ===
 
These are the language codes for each language. There is a standard for these, see [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO language code list].
 
The second part, "_us" or "_mx" and "_ve" for example, represent localisations of the main language for a particular country or dialect. Typically these will include variant spellings and other preferred local terminology and phrasing. So "es_mx" has spellings and idioms (and a very important [[Decimal separator]]) used in Mexican Spanish which are distinct from international Spanish. The es_ve has small differences from the international spanish that are of significance to Moodle users in Venezuela.
 
"en_us" is the English - United States language pack; "en" is Australian English, which is practically the same as British English.
 
=== I found a mistake or typo in a language pack. Or my language is only partial, much of it is still English. What do I do? ===
 
Language packs have maintainers and Moodle has its own language translation toolkit, known as AMOS. Other than some core languages maintained by Moodle HQ, most languages are maintained by volunteer maintainers.
 
See the [https://docs.moodle.org/dev/Translation_FAQ Translation FAQ page] for how to report issues and [https://lang.moodle.org/mod/page/view.php?id=9 the AMOS for newcomers page] for more information.
 
== Default Language  ==
 
=== Where can I set the default language for the site? ===


''Site Administration > Language > [[Language settings]]''
''Site Administration > Language > [[Language settings]]''


==Will installing several language packs decrease my server performance?==
Note you can only choose to set as default a Language pack that is already installed. If the language you want is not on the list, you will need to install the language pack first. See [[Language packs]].
Installing many (20+) language packs have [https://moodle.org/mod/forum/discuss.php?d=241098 almost 0 impact] on Moodle performance.
 
=== When I change to a new default language, users still have the old language. ===
 
Correct. When you change to a new site default language, this does not update the language setting in the profile for already existing users. It only sets a new default for new user accounts you create from now on.
 
To do updates for already existing users, you can:
 
* Tell users how to change it themselves in their user profiles
* Use the [[Upload users]] tool to do a mass update
* If you have access to the database, you can change this with a simple query. See [https://docs.moodle.org/29/en/ad-hoc_contributed_reports#List_of_users_with_language here for an example] of how to do this.
 
=== I've set a default site language but when I log in it switches to English. Why? ===
 
By default, Moodle detects a user's language from their browser setting. This language auto-detection may be disabled so that the default site language is used instead in ''Site administration > Language > [[Language settings]]''.
 
=== I've set a default site language, but the Moodle calendar is in English. Why? ===
 
If your Moodle calendar is not translated, then the string 'locale' (for *nix servers) or the string 'localewin' (for Windows servers) in the 'langconfig.php' file is wrong (or your server is not configured to support the language). There are quite a few languages that are not supported by Windows servers and the localewin server can not be set. In that case, you have to run your Moodle on a *nix server to make the translation of your Moodle calendar work. See [[:dev:Translation_langconfig]] for details.
 
=== How can I disable (hide) the language dropdown menu on the site front page? ===
 
Go to ''Site administration > Language > Language settings'' and un-tick the 'Display language menu' checkbox.
 
Because it is a customisation, Moodle will not erase the xx_local language files in Moodledata with an upgrade.  Moodle will upgrade any language folders it finds in the moodle/lang folder.


==How can I change a word or phrase used in Moodle?==
== Language Customisation and Multi-language ==


In ''Settings > Site Administration > Language > Language customization''.
=== How can I change a word or phrase used in Moodle? ===


See [[Language customization]] for details.
In ''Administration > Site Administration > Language > Language customisation''.


==How can I find where a language string is located?==
See [[Language customisation]] for details.


Tick the 'Show origin of languages strings' checkbox in ''Settings > Site administration > Development > Debugging'' then visit the page containing the string you want to customize. Add to the URL of the page &strings=1 and reload the page.
=== How can I find where a language string is located? ===


==Why are my changes not saved if I edit a language pack with the Moodle language pack editor?==
Tick the 'Show origin of languages strings' checkbox in ''Administration > Site administration > Development > Debugging'' then visit the page containing the string you want to customise. Add to the URL of the page <code>?strings=1</code> (or if it doesn't work try <code>&strings=1</code>) then reload the page.


This could be caused by a PHP accelerator. Try switching it off (usually in php.ini).
===Why are my changes not saved in my MoodleCloud site?===
Unfortunately customising language strings is not supported in MoodleCloud. (The same string cache is used for  for all sites and is read-only.)


==I've set a default site language but when I log in it switches to English. Why?==
=== Why are my changes not saved if I edit a language pack with the Moodle language pack editor? ===


By default, Moodle detects a user's language from their browser setting. This language auto-detection may be disabled so that the default site language is used instead in ''Site administration > Language > [[Language settings]]''.
This could be caused by the caching on the server. Language strings are cached into server memory for performance reasons and when you save changes, they may not be immediately picked up. First, refresh your own browser cache to refresh the pages from the site. Then if the strings are still not there, an administrator can purge the cache of the server.  


==How can I provide course content in more than one language?==
===How can I provide course content in more than one language?===


Labels, web pages, activity descriptions etc. may be provided in more than one language using the [[Multi language content|Multi language content filter]].
Labels, web pages, activity descriptions etc. may be provided in more than one language using the [[Multi language content|Multi language content filter]].


==How can I provide course headings in more than one language?==
===How can I provide course headings in more than one language?===
 
Set the multi language content filter to apply to content AND headings in ''Site administration > Plugins > Filters > Manage filters''.
 
===Are there any short cuts for editing a language?===
Yes, but be careful.  You can make use of the customise language process.  Basically copy the php files that contain the strings you want to change to the moodledata/lang/local folder.  For example, copy the /lang/en/moodle.php file to someplace.  Edit the file with a search and replace with whole word and case sensitive turned on, change Teacher to Instructor and Teachers to Instructors, do the same for teacher and teachers.  Now copy that saved copy of the moodle.php file to the  moodledata/lang/en_local folder.  Be careful not to change the String name.
 
===Is it possible to customise language strings per theme?===
Not by default, as when strings are customised, they are customised for the whole site. However, it is possible to make a new language  pack based on your main language and apply that pack to the course which has the theme. See this forum post for more information: https://moodle.org/mod/forum/discuss.php?d=220671
 
 
== Other Language Questions ==
 
===Will installing several language packs decrease my server performance?===
Installing many (20+) language packs have [https://moodle.org/mod/forum/discuss.php?d=241098 almost 0 impact] on Moodle performance. A copy of the language packs installed are stored in your site's local /mooodledata directory. Also, actively used language strings are cached in memory by your server as well to help performance, so as long as your server has sufficient RAM there will be no impact from having many language packs installed.
 
=== What is this Pirate version of English doing on my site? ===


Set the multi language content filter to apply to content AND headings in ''Settings > Site administration > Plugins > Filters > Manage filters''.
It has become something of a custom in the Moodle community over the years to observe [https://en.wikipedia.org/wiki/International_Talk_Like_a_Pirate_Day 'Talk Like a Pirate Day'] (September 19th) by temporarily changing the language of a site to allow the the English - Pirate (en_ar) language pack. See the discussion [https://moodle.org/mod/forum/discuss.php?d=132888 here] for more.


==How can I disable (hide) the language dropdown menu on the site front page?==
===Lang pack download failed with 'HTTP response code: HTTP/1.1 404 Not Found' after new release ===


Go to ''Settings > Site administration > Language > Language settings'' and un-tick the 'Display language menu' checkbox.
After we branch for a new release, Moodle will try and download the new version of lang packs, however for a while development is on-sync and no new language string differences will be introduced between the two branches. During this period, AMOS is not branched and so Moodle will fail to download new language packs.


==Are there any short cuts for editing a language?==
This is expected and it will be resolved once AMOS is opened up for new changes in the new version. See MDL-34028 for example.
Yes, but be careful.  You can make use of the customize language process. Basically copy the php files that contain the strings you want to change to the moodledata/lang/local folder.  For example, copy the /lang/en/moodle.php file to someplace.  Edit the file with a search and replace with whole word and case sensitive turned on, change Teacher to Instructor and Teachers to Instructors, do the same for teacher and teachers.  Now copy that saved copy of the moodle.php file to the  moodledata/lang/en_local folder.  Be careful not to change the String name.  


Because it is a customization, Moodle will not erase the xx_local language files in Moodledata with an upgrade.  Moodle will upgrade any language folders it finds in the moodle/lang folder.
===Why do the characters for my language (not English) show up as hollow squares ?===


==Is it possible to customise language strings per theme?==
[[File:Language_pack_name_hollow squares.png|400px]]
Not by default, as when strings are customised, they are customised for the whole site. However, it is possible to make a new language  pack based on your main language and apply that pack to the course which has the theme. See this forum post for more information: https://moodle.org/mod/forum/discuss.php?d=220671


==How can I make a new language pack?==
This problem may be caused by a missing/wrong character set, or using a font that does not support the character map needed (see [https://moodle.org/mod/forum/discuss.php?d=327521 this forum thead]).


See [[Translation]]. Even though your new language pack might be in a version of English (such as "Pirate talk!") it is still classed as a translation.
[[File:Language pack name is displayed.png|400px]]


== See also ==
== See also ==


* [[Translation FAQ]]
* Using Moodle [http://moodle.org/mod/forum/view.php?f=26 Languages forum]
* Using Moodle [http://moodle.org/mod/forum/view.php?f=26 Languages forum]


Using Moodle forum discussions
Using Moodle forum discussions:
* [http://moodle.org/mod/forum/discuss.php?d=131927#p604462 Edited Strings Not Visible]
* [http://moodle.org/mod/forum/discuss.php?d=131927#p604462 Edited Strings Not Visible]
* [http://moodle.org/mod/forum/discuss.php?d=163375 Language customization in 2.0]
* [https://moodle.org/mod/forum/discuss.php?d=316623#unread Months names in Arabic language pack]


[[Category:FAQ]]
[[Category:FAQ]]

Latest revision as of 16:20, 8 February 2016


General

Which is the official language for Moodle?

The "official" language for Moodle is actually the Australian English (hey mate!) , which in 100% the same as UK English. The default language on a new installation of Moodle, unless you change it, will be this version of English, denoted by the language code "en".

What do codes like "en" and "en_us" or "es" and "es_mx" and "es_ve" mean??

These are the language codes for each language. There is a standard for these, see ISO language code list.

The second part, "_us" or "_mx" and "_ve" for example, represent localisations of the main language for a particular country or dialect. Typically these will include variant spellings and other preferred local terminology and phrasing. So "es_mx" has spellings and idioms (and a very important Decimal separator) used in Mexican Spanish which are distinct from international Spanish. The es_ve has small differences from the international spanish that are of significance to Moodle users in Venezuela.

"en_us" is the English - United States language pack; "en" is Australian English, which is practically the same as British English.

I found a mistake or typo in a language pack. Or my language is only partial, much of it is still English. What do I do?

Language packs have maintainers and Moodle has its own language translation toolkit, known as AMOS. Other than some core languages maintained by Moodle HQ, most languages are maintained by volunteer maintainers.

See the Translation FAQ page for how to report issues and the AMOS for newcomers page for more information.

Default Language

Where can I set the default language for the site?

Site Administration > Language > Language settings

Note you can only choose to set as default a Language pack that is already installed. If the language you want is not on the list, you will need to install the language pack first. See Language packs.

When I change to a new default language, users still have the old language.

Correct. When you change to a new site default language, this does not update the language setting in the profile for already existing users. It only sets a new default for new user accounts you create from now on.

To do updates for already existing users, you can:

  • Tell users how to change it themselves in their user profiles
  • Use the Upload users tool to do a mass update
  • If you have access to the database, you can change this with a simple query. See here for an example of how to do this.

I've set a default site language but when I log in it switches to English. Why?

By default, Moodle detects a user's language from their browser setting. This language auto-detection may be disabled so that the default site language is used instead in Site administration > Language > Language settings.

I've set a default site language, but the Moodle calendar is in English. Why?

If your Moodle calendar is not translated, then the string 'locale' (for *nix servers) or the string 'localewin' (for Windows servers) in the 'langconfig.php' file is wrong (or your server is not configured to support the language). There are quite a few languages that are not supported by Windows servers and the localewin server can not be set. In that case, you have to run your Moodle on a *nix server to make the translation of your Moodle calendar work. See dev:Translation_langconfig for details.

How can I disable (hide) the language dropdown menu on the site front page?

Go to Site administration > Language > Language settings and un-tick the 'Display language menu' checkbox.

Because it is a customisation, Moodle will not erase the xx_local language files in Moodledata with an upgrade. Moodle will upgrade any language folders it finds in the moodle/lang folder.

Language Customisation and Multi-language

How can I change a word or phrase used in Moodle?

In Administration > Site Administration > Language > Language customisation.

See Language customisation for details.

How can I find where a language string is located?

Tick the 'Show origin of languages strings' checkbox in Administration > Site administration > Development > Debugging then visit the page containing the string you want to customise. Add to the URL of the page ?strings=1 (or if it doesn't work try &strings=1) then reload the page.

Why are my changes not saved in my MoodleCloud site?

Unfortunately customising language strings is not supported in MoodleCloud. (The same string cache is used for for all sites and is read-only.)

Why are my changes not saved if I edit a language pack with the Moodle language pack editor?

This could be caused by the caching on the server. Language strings are cached into server memory for performance reasons and when you save changes, they may not be immediately picked up. First, refresh your own browser cache to refresh the pages from the site. Then if the strings are still not there, an administrator can purge the cache of the server.

How can I provide course content in more than one language?

Labels, web pages, activity descriptions etc. may be provided in more than one language using the Multi language content filter.

How can I provide course headings in more than one language?

Set the multi language content filter to apply to content AND headings in Site administration > Plugins > Filters > Manage filters.

Are there any short cuts for editing a language?

Yes, but be careful. You can make use of the customise language process. Basically copy the php files that contain the strings you want to change to the moodledata/lang/local folder. For example, copy the /lang/en/moodle.php file to someplace. Edit the file with a search and replace with whole word and case sensitive turned on, change Teacher to Instructor and Teachers to Instructors, do the same for teacher and teachers. Now copy that saved copy of the moodle.php file to the moodledata/lang/en_local folder. Be careful not to change the String name.

Is it possible to customise language strings per theme?

Not by default, as when strings are customised, they are customised for the whole site. However, it is possible to make a new language pack based on your main language and apply that pack to the course which has the theme. See this forum post for more information: https://moodle.org/mod/forum/discuss.php?d=220671


Other Language Questions

Will installing several language packs decrease my server performance?

Installing many (20+) language packs have almost 0 impact on Moodle performance. A copy of the language packs installed are stored in your site's local /mooodledata directory. Also, actively used language strings are cached in memory by your server as well to help performance, so as long as your server has sufficient RAM there will be no impact from having many language packs installed.

What is this Pirate version of English doing on my site?

It has become something of a custom in the Moodle community over the years to observe 'Talk Like a Pirate Day' (September 19th) by temporarily changing the language of a site to allow the the English - Pirate (en_ar) language pack. See the discussion here for more.

Lang pack download failed with 'HTTP response code: HTTP/1.1 404 Not Found' after new release

After we branch for a new release, Moodle will try and download the new version of lang packs, however for a while development is on-sync and no new language string differences will be introduced between the two branches. During this period, AMOS is not branched and so Moodle will fail to download new language packs.

This is expected and it will be resolved once AMOS is opened up for new changes in the new version. See MDL-34028 for example.

Why do the characters for my language (not English) show up as hollow squares ?

Language pack name hollow squares.png

This problem may be caused by a missing/wrong character set, or using a font that does not support the character map needed (see this forum thead).

Language pack name is displayed.png

See also

Using Moodle forum discussions: