Google Translate with C# | Open Source Translate Program

in #utopian-io7 years ago (edited)

Note: This article is written with the help of this program. :)

With this program you can use google translation feature.

Especially for those who use the translation feature a lot.

This can change the project as desired.

With the program you can translate up to 102 different languages.

You can quickly translate sentences written in foreign languages.

Github Link : https://github.com/oguzdelioglu/Google-Translate-With-C-
Only Exe: Download

Design Work

step1.gif


Add Language Codes.

step2.gif


Translate Codes.

step3.gif


We are editing codes.

step4.gif


Testing

step5.gif


Result

step6.gif


Code list used in the project:

WebClient webClient = new WebClient();
try
{
string url = String.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text={0}&langpair={1}", textBox1.Text, comboBox1.Text + "|" + comboBox2.Text);
string result = webClient.DownloadString(url);
int bas = result.IndexOf("TRANSLATED_TEXT='") + "TRANSLATED_TEXT='".Length;
int bit = result.Substring(bas).IndexOf("';var");
result = result.Substring(bas, bit);
textBox2.Text = result.Trim();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Project language list

af   Afrikaans
sq   Albanian
am   Amharic
ar   Arabic
hy   Armenian
az   Azerbaijani
eu   Basque
be   Belarusian
bn   Bengali
bs   Bosnian
bg   Bulgarian
ca   Catalan
ceb  Cebuano
ny   Chichewa
zh-CN    Chinese
co   Corsican
hr   Croatian
cs   Czech
da   Danish
nl   Dutch
en   English
eo   Esperanto
et   Estonian
tl   Filipino
fi   Finnish
fr   French
fy   Frisian
gl   Galician
ka   Georgian
de   German
el   Greek
gu   Gujarati
ht   Haitian Creole
ha   Hausa
haw  Hawaiian
iw   Hebrew
hi   Hindi
hmn  Hmong
hu   Hungarian
is   Icelandic
ig   Igbo
id   Indonesian
ga   Irish
it   Italian
ja   Japanese
jw   Javanese
kn   Kannada
kk   Kazakh
km   Khmer
ko   Korean
ku   Kurdish (Kurmanji)
ky   Kyrgyz
lo   Lao
la   Latin
lv   Latvian
lt   Lithuanian
lb   Luxembourgish
mk   Macedonian
mg   Malagasy
ms   Malay
ml   Malayalam
mt   Maltese
mi   Maori
mr   Marathi
mn   Mongolian
my   Myanmar (Burmese)
ne   Nepali
no   Norwegian
ps   Pashto
fa   Persian
pl   Polish
pt   Portuguese
pa   Punjabi
ro   Romanian
ru   Russian
sm   Samoan
gd   Scots Gaelic
sr   Serbian
st   Sesotho
sn   Shona
sd   Sindhi
si   Sinhala
sk   Slovak
sl   Slovenian
so   Somali
es   Spanish
su   Sundanese
sw   Swahili
sv   Swedish
tg   Tajik
ta   Tamil
te   Telugu
th   Thai
tr   Turkish
uk   Ukrainian
ur   Urdu
uz   Uzbek
vi   Vietnamese
cy   Welsh
xh   Xhosa
yi   Yiddish
yo   Yoruba
zu   Zulu

You can use this easy to develop application for Steemit.

Comment if you want to have additional features for the program.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Merry Christmas !

Thank you for the contribution. It has been approved.

Great work. I think Google has also provided a paid API for more professional translation. But this one is good enough!

You can contact us on Discord.
[utopian-moderator]

Hey @odl I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 65359.95
ETH 3492.90
USDT 1.00
SBD 2.51