mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-13 10:36:25 +01:00
[ADD] Locale mapping for DataTables and Moment.JS
This commit is contained in:
@@ -117,6 +117,39 @@ LANGUAGES = ( # Sorted by Language Code alphabetical order + English at top
|
||||
("zh-hans", _("Simplified Chinese")),
|
||||
)
|
||||
|
||||
# Django's language codes are different from some of the libraries we use,
|
||||
# so we need to map them.
|
||||
LANGUAGE_MAPPING = {
|
||||
"DataTables": {
|
||||
"cs-cz": "cs",
|
||||
"de": "de-DE",
|
||||
"es": "es-ES",
|
||||
"fr-fr": "fr-FR",
|
||||
"it-it": "it-IT",
|
||||
"ja": "ja",
|
||||
"ko-kr": "ko",
|
||||
"nl-nl": "nl-NL",
|
||||
"pl-pl": "pl",
|
||||
"ru": "ru",
|
||||
"uk": "uk",
|
||||
"zh-hans": "zh-HANT",
|
||||
},
|
||||
"MomentJS": {
|
||||
"cs-cz": "cs",
|
||||
"de": "de",
|
||||
"es": "es",
|
||||
"fr-fr": "fr",
|
||||
"it-it": "it",
|
||||
"ja": "ja",
|
||||
"ko-kr": "ko",
|
||||
"nl-nl": "nl",
|
||||
"pl-pl": "pl",
|
||||
"ru": "ru",
|
||||
"uk": "uk",
|
||||
"zh-hans": "zh-cn",
|
||||
},
|
||||
}
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
|
||||
Reference in New Issue
Block a user