private string TranslateMe(string text) { //return text; // DISABILITAZIONE if (text == "") { return(text); } text = text.Replace("\r\n", "|"); DataRow[] drs = Search(FROM + "='" + text.Replace("'", "''") + "'"); if (drs.Length > 0) { try { string temp = ""; try { temp = drs[0][Language].ToString(); } catch { temp = ""; } if (temp.Length > 0) { temp = temp.Replace("|", "\r\n"); return(temp); } #if (COMPILING) else { Traduci dialog = new Traduci(text); dialog.ShowDialog(); AddString(DL, text, Language, dialog.Traduzione); text = dialog.Traduzione; dialog.Dispose(); } #endif } catch { } } else { AddString(DL, text); } text = text.Replace("|", "\r\n"); return(text); }
private string TranslateMe(string text) { //return text; // DISABILITAZIONE if (text == "") return text; text = text.Replace("\r\n", "|"); DataRow[] drs = Search(FROM+"='"+text.Replace("'","''")+"'"); if (drs.Length > 0) { try { string temp = ""; try { temp = drs[0][Language].ToString(); } catch { temp = ""; } if (temp.Length > 0) { temp = temp.Replace("|", "\r\n"); return temp; } #if(COMPILING) else { Traduci dialog = new Traduci(text); dialog.ShowDialog(); AddString(DL,text,Language, dialog.Traduzione); text = dialog.Traduzione; dialog.Dispose(); } #endif } catch { } } else AddString(DL, text); text = text.Replace("|", "\r\n"); return text; }