mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-28 11:36:53 -05:00
Add Arabic language to dropdown, fix header locale not working
This commit is contained in:
1
package-lock.json
generated
1
package-lock.json
generated
@@ -5,6 +5,7 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "website",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
||||
@@ -29,19 +29,24 @@ app.use(cookieParser())
|
||||
|
||||
// Locale express middleware setup
|
||||
app.use(expressLocale({
|
||||
"priority": ["cookie", "map", "accept-language", "default"],
|
||||
"priority": ['cookie', 'accept-language', 'map', 'default'],
|
||||
cookie: {name: 'preferredLocale'},
|
||||
// fallbacks for browsers that don't send a region code, but only a language
|
||||
map: {
|
||||
//de: 'de-DE',
|
||||
ar: 'ar-AR',
|
||||
es: 'es-ES',
|
||||
//fr: 'fr-FR',
|
||||
it: 'it-IT',
|
||||
ko: 'ko-KR',
|
||||
ru: 'ru-RU',
|
||||
tr: 'tr-TR'
|
||||
},
|
||||
allowed: ['en-US', 'es-ES', 'it-IT', 'ko-KR', 'ru-RU', 'tr-TR'],
|
||||
allowed: [
|
||||
'en-US', // English doesn't need as many allowed locales since it's the default anyways
|
||||
'ar', 'ar-AR',
|
||||
'es', 'es-ES',
|
||||
'it', 'it-IT',
|
||||
'ru', 'ru-RU',
|
||||
'tr', 'tr-TR',
|
||||
],
|
||||
"default": "en-US"
|
||||
}))
|
||||
|
||||
|
||||
@@ -39,14 +39,12 @@
|
||||
<div class="item"><span class="lang">🇺🇸</span><span class="locale-names">English</span></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="option">
|
||||
<input type="radio" class="radio" id="es-ES" name="category" />
|
||||
<label for="es-ES">
|
||||
<div class="item"><span class="lang">🇪🇸</span><span class="locale-names">Español</span></div>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="option">
|
||||
<input type="radio" class="radio" id="it-IT" name="category" />
|
||||
<label for="it-IT">
|
||||
@@ -65,6 +63,12 @@
|
||||
<div class="item"><span class="lang">🇹🇷</span><span class="locale-names">Türkçe</span></div>
|
||||
</label>
|
||||
</div>
|
||||
<div class="option">
|
||||
<input type="radio" class="radio" id="ar-AR" name="category" />
|
||||
<label for="ar-AR">
|
||||
<div class="item"><span class="lang">🇸🇦</span><span class="locale-names">اَلْعَرَبِيَّةُ</span></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="selected-locale">
|
||||
<div class="item"><span class="lang"></span></div>
|
||||
|
||||
Reference in New Issue
Block a user