Hi there, @Aurelien_Penel
Apologies for the delayed response!
Devs investigated the issue that Google considers Nos Solutions to be the name of the brand and doesn’t translate it.
To translate this phrase, we’ve added the code below to the Custom JS field on the Settings tab of your widget’s settings:
const SEPARATOR = '%$#';
const dictionary = {
'NOS SOLUTIONS': `NOS${SEPARATOR} SOLUTIONS`
};
function transformValue(value) {
const parts = value.split(SEPARATOR);
const firstPart = parts.shift();
const wrappedParts = parts.map(part => `<span>${part}</span>`);
return [firstPart, ...wrappedParts].join('');
}
function replaceText(rootNode) {
const walker = document.createTreeWalker(rootNode, NodeFilter.SHOW_TEXT, null, false);
const textNodes = [];
while (walker.nextNode()) {
textNodes.push(walker.currentNode);
}
textNodes.forEach(textNode => {
let text = textNode.nodeValue;
for (let key in dictionary) {
if (text.includes(key)) {
text = text.split(key).join(transformValue(dictionary[key]));
}
}
if (text !== textNode.nodeValue) {
const span = document.createElement('span');
span.innerHTML = text;
textNode.parentNode.replaceChild(span, textNode);
}
});
}
replaceText(document.body);
You may wonder why it’s translated as Us solutions instead of Our solutions. The thing is, that it’s now based on the Google Translate, and this is the exact result we get from the Google Translate directly. So, unfortunately, there is no way to change it.
We agree that the translation could use some improvement, and we already have a couple of ideas in our Wishlist:
Hopefully, we’ll be able to improve the translation quality in the future.
Regarding the button text, we’ve fixed the issue, and now it’s translated. Please check it out and let me know how it works on your end