-

Note: You are currently viewing documentation for Moodle 3.10. Up-to-date documentation for the latest stable version of Moodle may be available here: Table of locales.

Table of locales

From MoodleDocs

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.



Definition: (from Wikipedia) Locale is a set of parameters that defines the user's language, country and any special variant preferences that the user wants to see in their user interface. Usually a locale identifier consists of at least a language identifier and a region identifier.

Currently such locales are named differently under Unix-based and Win32-based platforms so we need to have them defined separately to allow Moodle to use them as necessary. For each lang package' available for Moodle, we must specify the locale value (Unix locale) and the localewin value (Win32 locale). Both those strings should be (no mandatory) defined inside each Moodle 1.6 and upwards langpack to be able to display locale strings properly.

The general syntax for locales is:

   language[_country][.charset]

(with information under brackets being optional)

While the .charset part seems to work properly under Unix, it seems that is not working under Win32 (at least from PHP), and strings returned from some PHP functions aren't in the charset specified but in some sort of default charset. Let's call it localewincharset. This forces us to convert from this charset to the current_charset() being used by the user.

So, for each 1.6 Moodle language pack, we'll describe below this columns:

  • package_name: name of the language pack as showed in http://download.moodle.org/lang16/.
  • lang_name: name of the language as showed in http://download.moodle.org/lang16/.
  • locale: locale string to be used under Unix platforms. This will be stored in each language langconfig.php file.
  • localewin: locale string to be used under Win32 platforms. This will be stored in each language langconfig.php file.
  • localewincharset: charset in which PHP is retrieving information from locale-dependent functions (strftime...). This will allow us to convert such strings to the final charset properly. This will be stored in each language langconfig.php file.


package_name lang_name locale localewin localewincharset
af_utf8 Afrikaans undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined
undefined undefined undefined undefined undefined