Language switching works
app.js - call to index.js changed public/javascripts/global.js - no more show version - no more 'showReset routes/index.js - added 'translate'-function views/index.pug - texts changed for translation views/layout.pug - show version and date public/javascripts/map.js - added text from server charts/preparecharts.js - translate texts locales/[en|de]/translation.json - new translations charts/urils.js - added translations package.json "version": "3.0.2", "date": "2023-04-19 11:00 UTC",
This commit is contained in:
@@ -15,7 +15,7 @@ export let url2call
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
import indexRouter from './routes/index.js'
|
||||
import * as indexRouter from './routes/index.js'
|
||||
import apiRouter from './routes/api.js'
|
||||
|
||||
i18next
|
||||
@@ -26,7 +26,7 @@ i18next
|
||||
loadPath: __dirname + '/locales/{{lng}}/{{ns}}.json'
|
||||
},
|
||||
fallbackLng: 'en',
|
||||
// debug: true,
|
||||
debug: true,
|
||||
preload: ['en', 'de']
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ app.use(cookieParser());
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
|
||||
app.use('/api', apiRouter)
|
||||
app.use('/', indexRouter);
|
||||
app.use('/', indexRouter.router);
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user