Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

Google Translate in default browser

Description
There is a Google Translate macro already, but it is using Google API and additional libraries, so this is simpler version.
Language
C#.net
Minimum Version
Created By
Tomi Nissinen
Contributors
-
Date Created
Jan 8, 2021
Date Last Modified
Apr 19, 2023

Macro Code

using System.Diagnostics;

//Change &tl= parameter (English &tl=en) to your preferred language in string url= line.
//Language codes are found: https://cloud.google.com/translate/docs/languages

public static class ClipboardFusionHelper
{
	public static string ProcessText(string text)
	{
        string url = "https://translate.google.com/?sl=auto&tl=en&op=translate&text={0}";
		url = string.Format(url, text.Replace(' ', '+'));
		Process.Start(new ProcessStartInfo
		{
    		FileName = url,
    		UseShellExecute = true
		});
        return text;
	}
}