I want to use WebView to show some html content
here is an example:
return (
As you find out, you can't have dynamic url for require. That's because require get the source at the app start regardless it's place in the code. You shuld require all of the {languageId}text.html and pass the required variable to the source:
var language = {
en: require(`../srv/localization/contents/entext.html`)
...
}
and use it as below:
source = require(language[en])