one of our japanese customers complains about the standard JS Dialog when leaving the page, because the message text is in english independent on the browser language.
Technically this is implemented like this:
- Code: Select all
window.onbeforeunload = function() {
return 'This is an onbeforeunload message.';
}
It is also part of the cefclient dialog testpage (http://tests/dialogs) and interestingly the text in the JS code is not used at all.
I reproduced this with the latest available version with the following steps:
- cefclient.exe --lang=de (or any other language different to en)
- Check in the DEV tools console: navigator.language = de-DE
- Open the dialog test page => Tests - Other Tests - Dialogs
- Press any of the buttons and close the dialog (Show alert or Show Confirm)
- Press back button
=> JsDialog appears with "Is it ok to leave/reload the page"
I assume that the text is not part of the locale files and is somehow hardcoded.
My question is now:
Is it possible to get this built-in text translated by adding it into the locale files (as a bug/feature/improvement request) or is there any possibility to change the messagetext in the callback functions without implementing the whole custom dialog.
I tried in OnBeforeUnloadDialog but the parameter "message" cannot be overwritten. And OnJsDialog is only called for custom dialogs.
Thanks,
Thomas