The lc_time_names server system variable sets the language used by the date and time functions DAYNAME(), MONTHNAME() and DATE_FORMAT().

The list of the locales supported by the current MariaDB installation can be obtained via the LOCALES plugin, available since MariaDB 10.0.4.

MariaDB supports the following locale values:

LocaleLanguageCountry
ar_AEArabicUnited Arab Emirates
ar_BHArabicBahrain
ar_DZArabicAlgeria
ar_EGArabicEgypt
ar_INArabicIndia
ar_IQArabicIraq
ar_JOArabicJordan
ar_KWArabicKuwait
ar_LBArabicLebanon
ar_LYArabicLibya
ar_MAArabicMorocco
ar_OMArabicOman
ar_QAArabicQatar
ar_SAArabicSaudi Arabia
ar_SDArabicSudan
ar_SYArabicSyria
ar_TNArabicTunisia
ar_YEArabicYemen
be_BYBelarusianBelarus
bg_BGBulgarianBulgaria
ca_ESCatalanSpain
cs_CZCzechCzech Republic
da_DKDanishDenmark
de_ATGermanAustria
de_BEGermanBelgium
de_CHGermanSwitzerland
de_DEGermanGermany
de_LUGermanLuxembourg
en_AUEnglishAustralia
en_CAEnglishCanada
en_GBEnglishUnited Kingdom
en_INEnglishIndia
en_NZEnglishNew Zealand
en_PHEnglishPhilippines
en_USEnglishUnited States
en_ZAEnglishSouth Africa
en_ZWEnglishZimbabwe
es_ARSpanishArgentina
es_BOSpanishBolivia
es_CLSpanishChile
es_COSpanishColumbia
es_CRSpanishCosta Rica
es_DOSpanishDominican Republic
es_ECSpanishEcuador
es_ESSpanishSpain
es_GTSpanishGuatemala
es_HNSpanishHonduras
es_MXSpanishMexico
es_NISpanishNicaragua
es_PASpanishPanama
es_PESpanishPeru
es_PRSpanishPuerto Rico
es_PYSpanishParaguay
es_SVSpanishEl Salvador
es_USSpanishUnited States
es_UYSpanishUruguay
es_VESpanishVenezuela
et_EEEstonianEstonia
eu_ESBasqueBasque
fi_FIFinnishFinland
fo_FOFaroeseFaroe Islands
fr_BEFrenchBelgium
fr_CAFrenchCanada
fr_CHFrenchSwitzerland
fr_FRFrenchFrance
fr_LUFrenchLuxembourg
gl_ESGalicianSpain
gu_INGujaratiIndia
he_ILHebrewIsrael
hi_INHindiIndia
hr_HRCroatianCroatia
hu_HUHungarianHungary
id_IDIndonesianIndonesia
is_ISIcelandicIceland
it_CHItalianSwitzerland
it_ITItalianItaly
ja_JPJapaneseJapan
ko_KRKoreanRepublic of Korea
lt_LTLithuanianLithuania
lv_LVLatvianLatvia
mk_MKMacedonianFYROM
mn_MNMongoliaMongolian
ms_MYMalayMalaysia
nb_NONorwegian(Bokmål)Norway
nl_BEDutchBelgium
nl_NLDutchThe Netherlands
no_NONorwegianNorway
pl_PLPolishPoland
pt_BRPortugeseBrazil
pt_PTPortugesePortugal
rm_CHRomanshSwitzerland
ro_RORomanianRomania
ru_RURussianRussia
ru_UARussianUkraine
sk_SKSlovakSlovakia
sl_SISlovenianSlovenia
sq_ALAlbanianAlbania
sr_YUSerbianYugoslavia
sv_FISwedishFinland
sv_SESwedishSweden
ta_INTamilIndia
te_INTeluguIndia
th_THThaiThailand
tr_TRTurkishTurkey
uk_UAUkrainianUkraine
ur_PKUrduPakistan
vi_VNVietnameseViet Nam
zh_CNChineseChina
zh_HKChineseHong Kong
zh_TWChineseTaiwan Province of China

Examples

Setting the lc_time_names and lc_messages variables to localize the units of date and time, and the server error messages.

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

Comments

Comments loading...