I searched around quite a bit, but could not find a solution to my problem.
My application uses i18next and it works fine, except for one problem: German umlauts (ΓΌ, ΓΆ, Γ€) is displayed as.
I donβt understand if this was wrong, because in this example application there are no problems with umlauts: http://i18next-example1.eu01.aws.af.cm/?setLng=de-DE (github: https: // github .com / rbeere / i18next-jade-express-sample )
How can I understand that?
The fault may be:
Translation.json
layout.jade file does not declare the page encoding. Therefore, the browser will automatically detect it. Regardless of whether the problem resolves or not, it is recommended to declare the page encoding in the header:
layout.jade
meta(http-equiv="Content-Type",content="text/html; charset=utf-8")
Content-Type The HTTP header field is not set correctly. Modify the HTTP response as follows:
Content-Type
app.get('/', function(req, res) { res.header("Content-Type", "text/html; charset=utf-8"); res.render('index', { title: 'Localization with Express, Jade and i18next-node'}); });