i18n: Switch to .json extension

This commit is contained in:
Samuel Ortion 2022-08-29 10:42:31 +02:00
parent 7e8ef90fb4
commit 9e8404db11
6 changed files with 6 additions and 5 deletions

3
app.js
View File

@ -42,7 +42,8 @@ app.use(session(sess));
i18n.expressBind(app, {
locales: ['en', 'es', 'fr', 'de'],
defaultLocale: 'en',
cookieName: 'locale'
cookieName: 'locale',
extension: '.json'
});
app.use(function (req, res, next) {

View File

@ -1,4 +0,0 @@
{
"Home": "Inicio",
"About": "Acerca de",
}

4
locales/es.json Normal file
View File

@ -0,0 +1,4 @@
{
"Home": "Inicio",
"About": "Acerca de"
}