Closed WilliamHolmes closed 6 years ago
OR another option (for my use case) to remove everything except the spelling suggestions.
UPDATE
FYI @Slapbox
I've managed to find where to change these strings.
ContextMenuBuilder.setAlternateStringFormatter
eg.
window.spellCheckHandler = new SpellCheckHandler();
window.spellCheckHandler.attachToInput();
window.spellCheckHandler.switchLanguage(lang);
window.contextMenuBuilder = new ContextMenuBuilder(window.spellCheckHandler, null, true);
window.contextMenuBuilder.setAlternateStringFormatter({
copyMail: () => `test_copyMail`,
copyLinkUrl: () => `test_copyLinkUrl`,
openLinkUrl: () => `test_openLinkUrl`,
copyImageUrl: () => `test_copyImageUrl`,
copyImage: () => `test_copyImage`,
addToDictionary: () => `test_addToDictionary`,
lookUpDefinition: ({word}) => `test_lookUpDefinition "${word}"`,
searchGoogle: () => `test_searchGoogle`,
cut: () => `test_cut`,
copy: () => `test_copy`,
paste: () => `test_paste`,
inspectElement: () => `test_inspectElement`
});
Im closing this issue, as this satisfies my requirements.
Nice work! Thanks for providing an update for everyone's benefit.
ref: electron 12705
Hi,
Use Case
Our web app allows users to change their preferred language. (Accept-Language Header)
Is it possible to change the default BrowserWindow context menu language?
Currently
In this example the user has chosen 'fr', and we use this language for the spellchecker, but the context menu shows in English.
(My Local machine, Mac OS, English)