Processing Ajax...

Title
Close Dialog

Message

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
Jan 8, 2021

Macro Code

using System;

//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(' ', '+'));
        System.Diagnostics.Process.Start(url);
        return text;
	}
}