# Server Locale

The [lc\_time\_names](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#lc_time_names) server system variable sets the language used by the date and time functions [DAYNAME()](https://mariadb.com/docs/server/reference/sql-functions/date-time-functions/dayname), [MONTHNAME()](https://mariadb.com/docs/server/reference/sql-functions/date-time-functions/monthname), and [DATE\_FORMAT()](https://mariadb.com/docs/server/reference/sql-functions/date-time-functions/date_format), and the [lc\_messages](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#lc_messages) sets the language for error messages.

The list of the locales supported by the current MariaDB installation can be obtained via the [LOCALES](https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization/locales-plugin) plugin.

MariaDB supports the following locale values:

| Locale | Language          | Territory                                                                                                                                                                                                                                                     |
| ------ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ar\_AE | Arabic            | United Arab Emirates                                                                                                                                                                                                                                          |
| ar\_BH | Arabic            | Bahrain                                                                                                                                                                                                                                                       |
| ar\_DZ | Arabic            | Algeria                                                                                                                                                                                                                                                       |
| ar\_EG | Arabic            | Egypt                                                                                                                                                                                                                                                         |
| ar\_IN | Arabic            | Iran                                                                                                                                                                                                                                                          |
| ar\_IQ | Arabic            | Iraq                                                                                                                                                                                                                                                          |
| ar\_JO | Arabic            | Jordan                                                                                                                                                                                                                                                        |
| ar\_KW | Arabic            | Kuwait                                                                                                                                                                                                                                                        |
| ar\_LB | Arabic            | Lebanon                                                                                                                                                                                                                                                       |
| ar\_LY | Arabic            | Libya                                                                                                                                                                                                                                                         |
| ar\_MA | Arabic            | Morocco                                                                                                                                                                                                                                                       |
| ar\_OM | Arabic            | Oman                                                                                                                                                                                                                                                          |
| ar\_QA | Arabic            | Qatar                                                                                                                                                                                                                                                         |
| ar\_SA | Arabic            | Saudi Arabia                                                                                                                                                                                                                                                  |
| ar\_SD | Arabic            | Sudan                                                                                                                                                                                                                                                         |
| ar\_SY | Arabic            | Syria                                                                                                                                                                                                                                                         |
| ar\_TN | Arabic            | Tunisia                                                                                                                                                                                                                                                       |
| ar\_YE | Arabic            | Yemen                                                                                                                                                                                                                                                         |
| be\_BY | Belarusian        | Belarus                                                                                                                                                                                                                                                       |
| bg\_BG | Bulgarian         | Bulgaria                                                                                                                                                                                                                                                      |
| ca\_ES | Catalan           | Catalan                                                                                                                                                                                                                                                       |
| cs\_CZ | Czech             | Czech Republic                                                                                                                                                                                                                                                |
| da\_DK | Danish            | Denmark                                                                                                                                                                                                                                                       |
| de\_AT | German            | Austria                                                                                                                                                                                                                                                       |
| de\_BE | German            | Belgium                                                                                                                                                                                                                                                       |
| de\_CH | German            | Switzerland                                                                                                                                                                                                                                                   |
| de\_DE | German            | Germany                                                                                                                                                                                                                                                       |
| de\_LU | German            | Luxembourg                                                                                                                                                                                                                                                    |
| el\_GR | Greek             | Greece                                                                                                                                                                                                                                                        |
| en\_AU | English           | Australia                                                                                                                                                                                                                                                     |
| en\_CA | English           | Canada                                                                                                                                                                                                                                                        |
| en\_GB | English           | United Kingdom                                                                                                                                                                                                                                                |
| en\_IN | English           | India                                                                                                                                                                                                                                                         |
| en\_NZ | English           | New Zealand                                                                                                                                                                                                                                                   |
| en\_PH | English           | Philippines                                                                                                                                                                                                                                                   |
| en\_US | English           | United States                                                                                                                                                                                                                                                 |
| en\_ZA | English           | South Africa                                                                                                                                                                                                                                                  |
| en\_ZW | English           | Zimbabwe                                                                                                                                                                                                                                                      |
| es\_AR | Spanish           | Argentina                                                                                                                                                                                                                                                     |
| es\_BO | Spanish           | Bolivia                                                                                                                                                                                                                                                       |
| es\_CL | Spanish           | Chile                                                                                                                                                                                                                                                         |
| es\_CO | Spanish           | Columbia                                                                                                                                                                                                                                                      |
| es\_CR | Spanish           | Costa Rica                                                                                                                                                                                                                                                    |
| es\_DO | Spanish           | Dominican Republic                                                                                                                                                                                                                                            |
| es\_EC | Spanish           | Ecuador                                                                                                                                                                                                                                                       |
| es\_ES | Spanish           | Spain                                                                                                                                                                                                                                                         |
| es\_GT | Spanish           | Guatemala                                                                                                                                                                                                                                                     |
| es\_HN | Spanish           | Honduras                                                                                                                                                                                                                                                      |
| es\_MX | Spanish           | Mexico                                                                                                                                                                                                                                                        |
| es\_NI | Spanish           | Nicaragua                                                                                                                                                                                                                                                     |
| es\_PA | Spanish           | Panama                                                                                                                                                                                                                                                        |
| es\_PE | Spanish           | Peru                                                                                                                                                                                                                                                          |
| es\_PR | Spanish           | Puerto Rico                                                                                                                                                                                                                                                   |
| es\_PY | Spanish           | Paraguay                                                                                                                                                                                                                                                      |
| es\_SV | Spanish           | El Salvador                                                                                                                                                                                                                                                   |
| es\_US | Spanish           | United States                                                                                                                                                                                                                                                 |
| es\_UY | Spanish           | Uruguay                                                                                                                                                                                                                                                       |
| es\_VE | Spanish           | Venezuela                                                                                                                                                                                                                                                     |
| et\_EE | Estonian          | Estonia                                                                                                                                                                                                                                                       |
| eu\_ES | Basque            | Basque                                                                                                                                                                                                                                                        |
| fi\_FI | Finnish           | Finland                                                                                                                                                                                                                                                       |
| fo\_FO | Faroese           | Faroe Islands                                                                                                                                                                                                                                                 |
| fr\_BE | French            | Belgium                                                                                                                                                                                                                                                       |
| fr\_CA | French            | Canada                                                                                                                                                                                                                                                        |
| fr\_CH | French            | Switzerland                                                                                                                                                                                                                                                   |
| fr\_FR | French            | France                                                                                                                                                                                                                                                        |
| fr\_LU | French            | Luxembourg                                                                                                                                                                                                                                                    |
| gl\_ES | Galician          | Galician                                                                                                                                                                                                                                                      |
| gu\_IN | Gujarati          | India                                                                                                                                                                                                                                                         |
| he\_IL | Hebrew            | Israel                                                                                                                                                                                                                                                        |
| hi\_IN | Hindi             | India                                                                                                                                                                                                                                                         |
| hr\_HR | Croatian          | Croatia                                                                                                                                                                                                                                                       |
| hu\_HU | Hungarian         | Hungary                                                                                                                                                                                                                                                       |
| id\_ID | Indonesian        | Indonesia                                                                                                                                                                                                                                                     |
| is\_IS | Icelandic         | Iceland                                                                                                                                                                                                                                                       |
| it\_CH | Italian           | Switzerland                                                                                                                                                                                                                                                   |
| it\_IT | Italian           | Italy                                                                                                                                                                                                                                                         |
| ja\_JP | Japanese          | Japan                                                                                                                                                                                                                                                         |
| ka\_GE | Georgian          | Georgia (From [MariaDB 10.11.3](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/10.11/10.11.3))                                                                                                                                               |
| ko\_KR | Korean            | Republic of Korea                                                                                                                                                                                                                                             |
| lt\_LT | Lithuanian        | Lithuania                                                                                                                                                                                                                                                     |
| lv\_LV | Latvian           | Latvia                                                                                                                                                                                                                                                        |
| mk\_MK | Macedonian        | FYROM                                                                                                                                                                                                                                                         |
| mn\_MN | Mongolia          | Mongolian                                                                                                                                                                                                                                                     |
| ms\_MY | Malay             | Malaysia                                                                                                                                                                                                                                                      |
| nb\_NO | Norwegian(Bokmål) | Norway                                                                                                                                                                                                                                                        |
| nl\_BE | Dutch             | Belgium                                                                                                                                                                                                                                                       |
| nl\_NL | Dutch             | The Netherlands                                                                                                                                                                                                                                               |
| no\_NO | Norwegian         | Norway                                                                                                                                                                                                                                                        |
| pl\_PL | Polish            | Poland                                                                                                                                                                                                                                                        |
| pt\_BR | Portugese         | Brazil                                                                                                                                                                                                                                                        |
| pt\_PT | Portugese         | Portugal                                                                                                                                                                                                                                                      |
| rm\_CH | Romansh           | Switzerland                                                                                                                                                                                                                                                   |
| ro\_RO | Romanian          | Romania                                                                                                                                                                                                                                                       |
| ru\_RU | Russian           | Russia                                                                                                                                                                                                                                                        |
| ru\_UA | Russian           | Ukraine                                                                                                                                                                                                                                                       |
| sk\_SK | Slovak            | Slovakia                                                                                                                                                                                                                                                      |
| sl\_SI | Slovenian         | Slovenia                                                                                                                                                                                                                                                      |
| sq\_AL | Albanian          | Albania                                                                                                                                                                                                                                                       |
| sr\_YU | Serbian           | Serbia (Deprecated in [MariaDB 10.0.11](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/10.0/10.0.11) and removed in [MariaDB 10.3.0](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/10.3/10.3.0)) |
| sv\_FI | Swedish           | Finland                                                                                                                                                                                                                                                       |
| sv\_SE | Swedish           | Sweden                                                                                                                                                                                                                                                        |
| sw\_KE | Swahili           | Kenya (from [MariaDB 11.1.2](https://app.gitbook.com/s/aEnK0ZXmUbJzqQrTjFyb/community-server/old-releases/11.1/11.1.2))                                                                                                                                       |
| ta\_IN | Tamil             | India                                                                                                                                                                                                                                                         |
| te\_IN | Telugu            | India                                                                                                                                                                                                                                                         |
| th\_TH | Thai              | Thailand                                                                                                                                                                                                                                                      |
| tr\_TR | Turkish           | Turkey                                                                                                                                                                                                                                                        |
| uk\_UA | Ukrainian         | Ukraine                                                                                                                                                                                                                                                       |
| ur\_PK | Urdu              | Pakistan                                                                                                                                                                                                                                                      |
| vi\_VN | Vietnamese        | Viet Nam                                                                                                                                                                                                                                                      |
| zh\_CN | Chinese           | China                                                                                                                                                                                                                                                         |
| zh\_HK | Chinese           | Hong Kong                                                                                                                                                                                                                                                     |
| zh\_TW | Chinese           | Taiwan Province of China                                                                                                                                                                                                                                      |

## Examples

Setting the [lc\_time\_names](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#lc_time_names) and [lc\_messages](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#lc_messages) variables to localize the units of date and time, and the server error messages.

```sql
SELECT DAYNAME('2013-04-01'), MONTHNAME('2013-04-01');
+-----------------------+-------------------------+
| DAYNAME('2013-04-01') | MONTHNAME('2013-04-01') |
+-----------------------+-------------------------+
| Monday                | April                   |
+-----------------------+-------------------------+

SET lc_time_names = 'fr_CA';

SELECT DAYNAME('2013-04-01'), MONTHNAME('2013-04-01');
+-----------------------+-------------------------+
| DAYNAME('2013-04-01') | MONTHNAME('2013-04-01') |
+-----------------------+-------------------------+
| lundi                 | avril                   |
+-----------------------+-------------------------+

SELECT blah;
ERROR 1054 (42S22): Unknown column 'blah' in 'field' list'

SET lc_messages = 'nl_NL';

SELECT blah;
ERROR 1054 (42S22): Onbekende kolom 'blah' in field list
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
