Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Table of locales.

Table of locales: Difference between revisions

From MoodleDocs
m (adding one link)
m (and more....)
Line 92: Line 92:
     <td>CP950
     <td>CP950
   <tr>
   <tr>
     <td>undefined
     <td>cs_utf8
     <td>Czech
     <td>Czech
     <td>undefined
     <td>cs_CZ.UTF-8
     <td>undefined
     <td>Czech_Czech Republic.1250
     <td>undefined
     <td>WINDOWS-1250
   <tr>
   <tr>
     <td>undefined
     <td>da_utf8
     <td>Danish
     <td>Danish
     <td>undefined
     <td>da_DK.UTF-8
     <td>undefined
     <td>Danish_Denmark.1252
     <td>undefined
     <td>WINDOWS-1252
   <tr>
   <tr>
     <td>undefined
     <td>nl_utf8
     <td>Dutch
     <td>Dutch
     <td>undefined
     <td>nl_NL.UTF-8
     <td>undefined
     <td>Dutch_Netherlands.1252
     <td>undefined
     <td>WINDOWS-1252
   <tr>
   <tr>
     <td>undefined
     <td>en_utf8
     <td>English
     <td>English
     <td>undefined
     <td>en.UTF-8
     <td>undefined
     <td>English_Australia.1252
     <td>undefined
     <td>-empty string-
   <tr>
   <tr>
     <td>undefined
     <td>en_us_utf8
     <td>English (US)
     <td>English (US)
     <td>undefined
     <td>-parent en_utf8 used-
     <td>undefined
     <td>-parent en_utf8 used-
     <td>undefined
     <td>-parent en_utf8 used-
   <tr>
   <tr>
     <td>undefined
     <td>et_utf8
     <td>Estonian
     <td>Estonian
     <td>undefined
     <td>et_EE.UTF-8
     <td>undefined
     <td>Estonian_Estonia.1257
     <td>undefined
     <td>WINDOWS-1257
   <tr>
   <tr>
     <td>undefined
     <td>fa_utf8
     <td>Farsi
     <td>Farsi
     <td>undefined
     <td><span style="color:red">en.UTF-8</span>
     <td>undefined
     <td>Farsi_Iran.1256
     <td>undefined
     <td>WINDOWS-1256
   <tr>
   <tr>
     <td>undefined
     <td>undefined

Revision as of 01:13, 25 March 2006

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.



Introduction

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.

Table

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 en.UTF-8 Afrikaans.1252 WINDOWS-1252
sq_utf8 Albanian al.UTF-8 Albanian_Albania.1250 WINDOWS-1250
ar_utf8 Arabic en.UTF-8 Arabic.1256 WINDOWS-1256
eu_utf8 Basque eu.UTF-8 Basque_Spain.1252 WINDOWS-1252
be_utf8 Belarusian en.UTF-8 Belarusian_Belarus.1251 WINDOWS-1251
bs_utf8 Bosnian bs.UTF-8 Serbian (Latin) WINDOWS-1250
bg_utf8 Bulgarian en.UTF-8 Bulgarian_Bulgaria.1251 WINDOWS-1251
ca_utf8 Catalan ca_ES.UTF-8 Catalan_Spain.1252 WINDOWS-1252
zh_cn_utf8 Chinese (Simplified) zh_CN.UTF-8 Chinese_China.936 CP936
zh_tw_utf8 Chinese (Traditional zh_TW.UTF-8 Chinese_Taiwan.950 CP950
cs_utf8 Czech cs_CZ.UTF-8 Czech_Czech Republic.1250 WINDOWS-1250
da_utf8 Danish da_DK.UTF-8 Danish_Denmark.1252 WINDOWS-1252
nl_utf8 Dutch nl_NL.UTF-8 Dutch_Netherlands.1252 WINDOWS-1252
en_utf8 English en.UTF-8 English_Australia.1252 -empty string-
en_us_utf8 English (US) -parent en_utf8 used- -parent en_utf8 used- -parent en_utf8 used-
et_utf8 Estonian et_EE.UTF-8 Estonian_Estonia.1257 WINDOWS-1257
fa_utf8 Farsi en.UTF-8 Farsi_Iran.1256 WINDOWS-1256
undefined Filipino undefined undefined undefined
undefined Finnish undefined undefined undefined
undefined French undefined undefined undefined
undefined French (Canada) undefined undefined undefined
undefined Gaelic undefined undefined undefined
undefined Gallego undefined undefined undefined
undefined Georgian undefined undefined undefined
undefined German undefined undefined undefined
undefined German (Personal) undefined undefined undefined
undefined Greek undefined undefined undefined
undefined Hebrew undefined undefined undefined
undefined Hindi undefined undefined undefined
undefined Hungarian undefined undefined undefined
undefined Indonesian undefined undefined undefined
undefined Italian undefined undefined undefined
undefined Japanese undefined undefined undefined
undefined Kannada undefined undefined undefined
undefined Khmer undefined undefined undefined
undefined Korean undefined undefined undefined
undefined Lithuanian undefined undefined undefined
undefined Latvian undefined undefined undefined
undefined Malaysian undefined undefined undefined
undefined Maori (Ngai Tahu) undefined undefined undefined
undefined Norwegian undefined undefined undefined
undefined Norwegian (Primary) undefined undefined undefined
undefined Nynorsk undefined undefined undefined
undefined Polish undefined undefined undefined
undefined Portuguese undefined undefined undefined
undefined Portuguese (Brazil) undefined undefined undefined
undefined Romanian undefined undefined undefined
undefined Russian undefined undefined undefined
undefined Serbian undefined undefined undefined
undefined Slovak undefined undefined undefined
undefined Slovenian undefined undefined undefined
undefined Somali undefined undefined undefined
undefined Spanish (International) undefined undefined undefined
undefined Spanish (Spain) undefined undefined undefined
undefined undefined undefined undefined undefined
undefined Swedish undefined undefined undefined
undefined Tagalog undefined undefined undefined
undefined Thai undefined undefined undefined
undefined Turkish undefined undefined undefined
undefined Ukrainian undefined undefined undefined
undefined Vietnamese undefined undefined undefined

Note: Some locales for windows in red could be incorrect (technically or geographically but they are the only way I've found to show dates properly in my XP box). Also some other coloured cells (in other columns should be revised).

Some references

Windows

Unix

Other Info