Currently int the non-deterministic mode LANG is overwritten by :
|
var lang = ((typeof navigator == 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8'; |
that is okay when we are using browser. However, when we are using NodeJS that does not have navigator, we are overwritting the LANG variable. It is really problematic because we still do not have a chance to set the desired locale.
My suggestion would be to pass the process.env.LANG if it's available.
var lang = ENVIRONMENT_IS_NODE ? process.env.LANG : ((typeof navigator == 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8';
connected past issues/PRs:
#8751
#16261
#2549
Currently int the non-deterministic mode
LANGis overwritten by :emscripten/src/library_wasi.js
Line 47 in fbc5d5c
that is okay when we are using browser. However, when we are using NodeJS that does not have
navigator, we are overwritting theLANGvariable. It is really problematic because we still do not have a chance to set the desired locale.My suggestion would be to pass the
process.env.LANGif it's available.connected past issues/PRs:
#8751
#16261
#2549