Difference between revisions of "Table of locales"

Jump to: navigation, search
m (and more....)
(Shifted to dev docs)
 
(33 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Template:Work in progress}}
+
{{Moved_to_dev_docs}}
__NOTOC__
 
===Introduction===
 
'''Definition:''' (from [http://en.wikipedia.org/wiki/Locale 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.
 
 
 
 
 
<table align="center" border="1" cellpadding="5">
 
  <tr>
 
    <th><b>package_name</b>
 
    <th><b>lang_name</b>
 
    <th><b>locale</b>
 
    <th><b>localewin</b>
 
    <th><b>localewincharset</b>
 
  <tr>
 
    <td>af_utf8
 
    <td>Afrikaans
 
    <td><span style="color:red">en.UTF-8</span>
 
    <td>Afrikaans.1252
 
    <td>WINDOWS-1252
 
  <tr>
 
    <td>sq_utf8
 
    <td>Albanian
 
    <td>al.UTF-8
 
    <td>Albanian_Albania.1250
 
    <td>WINDOWS-1250
 
  <tr>
 
    <td>ar_utf8
 
    <td>Arabic
 
    <td><span style="color:red">en.UTF-8</span>
 
    <td>Arabic.1256
 
    <td>WINDOWS-1256
 
  <tr>
 
    <td>eu_utf8
 
    <td>Basque
 
    <td>eu.UTF-8
 
    <td>Basque_Spain.1252
 
    <td>WINDOWS-1252
 
  <tr>
 
    <td>be_utf8
 
    <td>Belarusian
 
    <td><span style="color:red">en.UTF-8</span>
 
    <td>Belarusian_Belarus.1251
 
    <td>WINDOWS-1251
 
  <tr>
 
    <td>bs_utf8
 
    <td>Bosnian
 
    <td>bs.UTF-8
 
    <td><span style="color:red">Serbian (Latin)</span>
 
    <td>WINDOWS-1250
 
  <tr>
 
    <td>bg_utf8
 
    <td>Bulgarian
 
    <td><span style="color:red">en.UTF-8</span>
 
    <td>Bulgarian_Bulgaria.1251
 
    <td>WINDOWS-1251
 
  <tr>
 
    <td>ca_utf8
 
    <td>Catalan
 
    <td>ca_ES.UTF-8
 
    <td>Catalan_Spain.1252
 
    <td>WINDOWS-1252
 
  <tr>
 
    <td>zh_cn_utf8
 
    <td>Chinese (Simplified)
 
    <td>zh_CN.UTF-8
 
    <td>Chinese_China.936
 
    <td>CP936
 
  <tr>
 
    <td>zh_tw_utf8
 
    <td>Chinese (Traditional
 
    <td>zh_TW.UTF-8
 
    <td>Chinese_Taiwan.950
 
    <td>CP950
 
  <tr>
 
    <td>cs_utf8
 
    <td>Czech
 
    <td>cs_CZ.UTF-8
 
    <td>Czech_Czech Republic.1250
 
    <td>WINDOWS-1250
 
  <tr>
 
    <td>da_utf8
 
    <td>Danish
 
    <td>da_DK.UTF-8
 
    <td>Danish_Denmark.1252
 
    <td>WINDOWS-1252
 
  <tr>
 
    <td>nl_utf8
 
    <td>Dutch
 
    <td>nl_NL.UTF-8
 
    <td>Dutch_Netherlands.1252
 
    <td>WINDOWS-1252
 
  <tr>
 
    <td>en_utf8
 
    <td>English
 
    <td>en.UTF-8
 
    <td>English_Australia.1252
 
    <td>-empty string-
 
  <tr>
 
    <td>en_us_utf8
 
    <td>English (US)
 
    <td>-parent en_utf8 used-
 
    <td>-parent en_utf8 used-
 
    <td>-parent en_utf8 used-
 
  <tr>
 
    <td>et_utf8
 
    <td>Estonian
 
    <td>et_EE.UTF-8
 
    <td>Estonian_Estonia.1257
 
    <td>WINDOWS-1257
 
  <tr>
 
    <td>fa_utf8
 
    <td>Farsi
 
    <td><span style="color:red">en.UTF-8</span>
 
    <td>Farsi_Iran.1256
 
    <td>WINDOWS-1256
 
  <tr>
 
    <td>fil_utf8
 
    <td>Filipino
 
    <td> fil.UTF-8
 
    <td><span style="color:red">Filipino_Philippines.1252</span>
 
    <td><span style="color:red">WINDOWS-1252</span>
 
  <tr>
 
    <td>fi_utf8
 
    <td>Finnish
 
    <td>fi_FI.UTF-8
 
    <td>Finnish_Finland.1252
 
    <td>WINDOWS-1252
 
  <tr>
 
    <td>fr_utf8
 
    <td>French
 
    <td>fr_FR.UTF-8
 
    <td>French_France.1252
 
    <td>WINDOWS-1252
 
  <tr>
 
    <td>fr_ca_utf8
 
    <td>French (Canada)
 
    <td>fr_CA.UTF-8
 
    <td>-parent fr_utf8 used-
 
    <td>-parent fr_utf8 used-
 
  <tr>
 
    <td>undefined
 
    <td>Gaelic
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Gallego
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Georgian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>German
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>German (Personal)
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Greek
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Hebrew
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Hindi
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Hungarian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Indonesian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Italian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Japanese
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Kannada
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Khmer
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Korean
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Lithuanian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Latvian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Malaysian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Maori (Ngai Tahu)
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Norwegian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Norwegian (Primary)
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Nynorsk
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Polish
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Portuguese
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Portuguese (Brazil)
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Romanian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Russian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Serbian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Slovak
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Slovenian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Somali
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Spanish (International)
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Spanish (Spain)
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Swedish
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Tagalog
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Thai
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Turkish
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Ukrainian
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
  <tr>
 
    <td>undefined
 
    <td>Vietnamese
 
    <td>undefined
 
    <td>undefined
 
    <td>undefined
 
</table>
 
 
 
'''Note:''' Some locales for windows <span style="color:red">in red</span> 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====
 
 
 
* Win32 Language names: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_language_strings.asp
 
* Win32 Country names: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_country_strings.asp
 
* Win32 Codepage codes: http://www.microsoft.com/globaldev/reference/wincp.mspx
 
* Languages and codepages: http://www.science.co.il/Language/Locale-Codes.asp?s=codepage
 
* More languages and codepages: http://code.cside.com/3rdpage/windows/
 
* Languages and locales: http://www.livio.net/main/charset.asp
 
 
 
====Unix====
 
 
 
* Unix Language names: http://www.loc.gov/standards/iso639-2/englangn.html (639-2 is used only if 639-1 doesn't exist, see the "Locale Name Guide" below).
 
* Unix Country names: http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
 
* Unix Charset codes: http://www.w3.org/International/O-charset-list.html
 
 
 
====Other Info====
 
 
 
* Locale Name Guide: http://openi18n.org/docs/text/LocNameGuide-V10.txt
 
* FAQ about ISO 639: http://www.loc.gov/standards/iso639-2/faq.html
 
* One initiative from Unicode: http://www.unicode.org/cldr/index.html
 
* Weekdays and Months: http://www.domesticat.net/misc/monthsdays.php
 
 
 
[[Category:Developer]]
 
[[Category:Language]]
 
[[Category:UTF-8|Scripts]]
 

Latest revision as of 08:24, 22 June 2011

This development related page is now located in the Dev docs.

See the Table of locales page in the Dev docs.