Page Translation

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

Page Translation

Postby Chrom654 » Tue Nov 09, 2021 3:58 am

How do I translate a page?
In Chrome, I do:
- right click on the page;
- I choose "Translate";
- Chrome translates the page;

How to do this in CefSharp (using C#)?
Attachments
6eWdi.png
6eWdi.png (20.06 KiB) Viewed 13955 times
Chrom654
Newbie
 
Posts: 2
Joined: Mon Nov 08, 2021 5:00 pm

Re: Page Translation

Postby amaitland » Tue Nov 09, 2021 2:19 pm

I don't believe CEF supports translate in the alloy runtime.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: Page Translation

Postby Chrom654 » Wed Nov 10, 2021 11:31 am

amaitland wrote:I don't believe CEF supports translate in the alloy runtime.

Are there other ways to translate a page using CEF, on the principle of how Chrome does it?
Chrom654
Newbie
 
Posts: 2
Joined: Mon Nov 08, 2021 5:00 pm

Re: Page Translation

Postby ndesktop » Thu Nov 11, 2021 8:52 am

Here is the starting point.
The actual work is in TranslateManager::TranslatePage. A Google API key is needed, from what I see in code.
The translation seems to be done via TranslateScript::Request.
ndesktop
Master
 
Posts: 754
Joined: Thu Dec 03, 2015 10:10 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 8 guests