1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

C# translator problem

Discussion in 'C#' started by Klopske11, Oct 2, 2010.

  1. Klopske11

    Klopske11 New Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    Hello everyone,
    Im new to programming and spending a lot of time trying things like a translator.
    I've been working on this translator in C# the last few hours, using the Bing API and it works for translating english to dutch. but i've got a problem:

    Now, I want to use radiobuttons to let the user choose the language,
    and this is the problem:


    strTranslatedText = client.Translate("BBB3D27FD8F14CC7E38AF6F8B41096120A546B5E", txtTranslate.Text, "nl", "en");


    Can I tie "nl" and "en" to a function or something that enables the user to change "nl" and/or "en" in that line by clicking the radiobuttons.

    something like this:


    string nl = 0;
    string en = 1;

    txtTranslate.Text, "0", "1");


    how should I do this?

Share This Page