Give option to go english only

master
Mark Moffat 2019-11-06 19:13:16 +10:30
parent 2aa973a692
commit c92194dd56
4 changed files with 9 additions and 2 deletions

View File

@ -115,6 +115,10 @@
},
"defaultLocale": {
"type": "string"
},
"enableLanguages": {
"type": "boolean",
"default": true
}
},
"required": [

View File

@ -161,5 +161,6 @@
"Leave a comment?": "Lascia un commento?",
"Cart contents": "Contenuto del carrello",
"Shipping": "Spedizione:",
"Empty cart": "Svuota carrello"
"Empty cart": "Svuota carrello",
"Payment ID": "Payment ID"
}

View File

@ -615,7 +615,7 @@ router.get('/:page?', async (req, res, next) => {
message: clearSessionValue(req.session, 'message'),
messageType: clearSessionValue(req.session, 'messageType'),
pageCloseBtn: showCartCloseBtn('page'),
config: req.app.config,
config,
productsPerPage: numberProducts,
totalProductCount: results.totalProducts,
pageNum: 1,

View File

@ -103,6 +103,7 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
{{#ifCond @root.config.enableLanguages "!=" false}}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ @root.__ "Languages" }} <span class="caret"></span></a>
<ul class="dropdown-menu">
@ -111,6 +112,7 @@
{{/availableLanguages}}
</ul>
</li>
{{/ifCond}}
{{#unless admin}}
{{#ifCond page '!=' 'checkout'}}
{{#ifCond page '!=' 'pay'}}