Overwriting texts is quite easy.
All you need is a custom json file containing the texts:
{
"bahlsenContactForm": {
"intro" : "Hello. This text is set locally in a json file and does not come from the central form instance."
}
}
And some Javascript to load and activate the custom texts.
<script>
window.addEventListener('load', function(){
i18next
.use(i18nextXHRBackend)
.init({
lng: 'de_pickup', // evtl. use language-detector https://github.com/i18next/i18next-browser-languageDetector
backend: {
loadPath: './de_mybrandwebsite.json'
}
}, function(err, t) {
// for options see
// https://github.com/i18next/jquery-i18next#initialize-the-plugin
jqueryI18next.init(i18next, $);
$('#bahlsengroup_contactform').localize();
});
});
</script>
The identifiers of each text can be found within the form markup. Here the attribute data-i18n="bahlsenContactForm.Form.intro"
is set.