language (sopken) translation

  • Thread starter Thread starter colin
  • Start date Start date
C

colin

Hi,
I need to translate some text messages wich are in a file wich
is in windows .ini format,
eg:-

[Info]
Title=haunted church
[Message1]
NewMessage=do not enter


from czech to english,
there are quite a few translation websites wich do online translations,
but only 1 ive found wich can take czech,
http://www.tranexp.com/
its not that good but is at least a start.

but if I pass it the whole .ini file it makes a mess of the headings etc,
I could use the c# webservices to access the website and pass it each
message at a time
rather than doing it by hand, but is there an easy way of doing this ?

ive only a limited number of files to do so I dont realy want anything
costly.

thanks

Colin =^.^=
 
Colin,

Well, you can call the GetPrivateProfile* functions in the Win32 API to
get the values for the various items in the INI file and then pass those to
your web service to get translations that don't involve the headers of the
INI file and whatnot.

You should be able to find the definition of the functions at
http://www.pinvoke.net
 
thanks, but the hard part isnt geting the data from the .ini file,
as I create that anyway, but accessing a web translater from within c#.

Colin =^.^=

Nicholas Paldino said:
Colin,

Well, you can call the GetPrivateProfile* functions in the Win32 API to
get the values for the various items in the INI file and then pass those
to your web service to get translations that don't involve the headers of
the INI file and whatnot.

You should be able to find the definition of the functions at
http://www.pinvoke.net


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

colin said:
Hi,
I need to translate some text messages wich are in a file wich
is in windows .ini format,
eg:-

[Info]
Title=haunted church
[Message1]
NewMessage=do not enter


from czech to english,
there are quite a few translation websites wich do online translations,
but only 1 ive found wich can take czech,
http://www.tranexp.com/
its not that good but is at least a start.

but if I pass it the whole .ini file it makes a mess of the headings etc,
I could use the c# webservices to access the website and pass it each
message at a time
rather than doing it by hand, but is there an easy way of doing this ?

ive only a limited number of files to do so I dont realy want anything
costly.

thanks

Colin =^.^=
 
I would warn you that using automated translations is going to give you VERY
poorly translated text. Translation involves a lot more than simply
translating individual words. Even translations by someone who speaks both
languages will generally be pretty bad if the person isn't very fluent in
both languages.

If the text to be translated is technical (like software related
terminology), that adds further difficulty if the person translating isn't
familiar with the terminology in both languages in question.

Translations, even by some of the better automated translation systems (like
Babelfish) do a pretty poor job overall. The can do enough that the reader
can generally decipher the meaning, but they rarely translate into something
that sounds natural.

I speak from experience as both a developer who has worked with professional
translators to localize applications and as someone who has actually done
translations (translating contracts from Spanish to English, English being
my native tongue). Translation is both an art and an acquired skill. I have
acquired some of the skill, but I don't have the art and my translations are
pretty weak, but they're FAR better than anything an automated system can
do.

I don't mean to discourage you, but simply to let you know the reality of
the situation.
 
Colin,

Well, the translators might not offer a web service interface, but you
should be able to mimic going through a browser with an
HttpWebRequest/HttpWebResponse class. You just need to look at the traffic
that is sent on a request (use something like Fiddler to see what is sent)
and then replicate that. On return, you can parse the response to get the
translated result.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

colin said:
thanks, but the hard part isnt geting the data from the .ini file,
as I create that anyway, but accessing a web translater from within c#.

Colin =^.^=

Nicholas Paldino said:
Colin,

Well, you can call the GetPrivateProfile* functions in the Win32 API
to get the values for the various items in the INI file and then pass
those to your web service to get translations that don't involve the
headers of the INI file and whatnot.

You should be able to find the definition of the functions at
http://www.pinvoke.net


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

colin said:
Hi,
I need to translate some text messages wich are in a file wich
is in windows .ini format,
eg:-

[Info]
Title=haunted church
[Message1]
NewMessage=do not enter


from czech to english,
there are quite a few translation websites wich do online translations,
but only 1 ive found wich can take czech,
http://www.tranexp.com/
its not that good but is at least a start.

but if I pass it the whole .ini file it makes a mess of the headings
etc,
I could use the c# webservices to access the website and pass it each
message at a time
rather than doing it by hand, but is there an easy way of doing this ?

ive only a limited number of files to do so I dont realy want anything
costly.

thanks

Colin =^.^=
 
yeah, like I said its not that good but its at least a start,
I have tried it and I can decipher some of it and make it into better
sentances,
but even then a significant proportion is still un inteligable,
but it would then make less work for someone who knew the language,
or tried to work out the meaning from the situation context,
fortunatly its not specifically technical.

Colin =^.^=

Fredo said:
I would warn you that using automated translations is going to give you
VERY poorly translated text. Translation involves a lot more than simply
translating individual words. Even translations by someone who speaks both
languages will generally be pretty bad if the person isn't very fluent in
both languages.

If the text to be translated is technical (like software related
terminology), that adds further difficulty if the person translating isn't
familiar with the terminology in both languages in question.

Translations, even by some of the better automated translation systems
(like Babelfish) do a pretty poor job overall. The can do enough that the
reader can generally decipher the meaning, but they rarely translate into
something that sounds natural.

I speak from experience as both a developer who has worked with
professional translators to localize applications and as someone who has
actually done translations (translating contracts from Spanish to English,
English being my native tongue). Translation is both an art and an
acquired skill. I have acquired some of the skill, but I don't have the
art and my translations are pretty weak, but they're FAR better than
anything an automated system can do.

I don't mean to discourage you, but simply to let you know the reality of
the situation.


colin said:
Hi,
I need to translate some text messages wich are in a file wich
is in windows .ini format,
eg:-

[Info]
Title=haunted church
[Message1]
NewMessage=do not enter


from czech to english,
there are quite a few translation websites wich do online translations,
but only 1 ive found wich can take czech,
http://www.tranexp.com/
its not that good but is at least a start.

but if I pass it the whole .ini file it makes a mess of the headings etc,
I could use the c# webservices to access the website and pass it each
message at a time
rather than doing it by hand, but is there an easy way of doing this ?

ive only a limited number of files to do so I dont realy want anything
costly.

thanks

Colin =^.^=
 
yeah thanks, thats what I was thinking I could do as a last resort,
I was looking for examples of doing automated translations but so
much of it is to do with translating the computer language eg java<->c#.

it might not be too dificult but ive not used the httweb* classes yet,
but il give fiddler a look ...

Colin =^.^=


Nicholas Paldino said:
Colin,

Well, the translators might not offer a web service interface, but you
should be able to mimic going through a browser with an
HttpWebRequest/HttpWebResponse class. You just need to look at the
traffic that is sent on a request (use something like Fiddler to see what
is sent) and then replicate that. On return, you can parse the response
to get the translated result.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

colin said:
thanks, but the hard part isnt geting the data from the .ini file,
as I create that anyway, but accessing a web translater from within c#.

Colin =^.^=

Nicholas Paldino said:
Colin,

Well, you can call the GetPrivateProfile* functions in the Win32 API
to get the values for the various items in the INI file and then pass
those to your web service to get translations that don't involve the
headers of the INI file and whatnot.

You should be able to find the definition of the functions at
http://www.pinvoke.net


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,
I need to translate some text messages wich are in a file wich
is in windows .ini format,
eg:-

[Info]
Title=haunted church
[Message1]
NewMessage=do not enter


from czech to english,
there are quite a few translation websites wich do online translations,
but only 1 ive found wich can take czech,
http://www.tranexp.com/
its not that good but is at least a start.

but if I pass it the whole .ini file it makes a mess of the headings
etc,
I could use the c# webservices to access the website and pass it each
message at a time
rather than doing it by hand, but is there an easy way of doing this ?

ive only a limited number of files to do so I dont realy want anything
costly.

thanks

Colin =^.^=
 
thanks, ive managed to get it working exept for the urlencoding,
the string "prokletého podzemí" gets converted to proklet%E9ho+podzem%ED
looking in fiddler,
but when I use System.Web.HttpUtility.UrlEncode(string) it converts it to
proklet%c3%a9ho+podzem%c3%ad
wich isnt right, im not sure what I need to use, ive tried a few
alternatives such as encoding optional parameters,
but only makes it worse, any ideas ?
(apart from doing the conversion myself ofc lol)

Colin =^.^=
 
ah its ok I found a few examples of using it and seems the
System.Text.Encoding doesnt contain the entry I need.
System.Web.HttpUtility.UrlEncode(textIn,
System.Text.Encoding.GetEncoding("Windows-1252"));
using this it works now :)
Colin =^.^=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Highligting property grid lines 4
customized propertygrid 8
Marshelling help 2
Windows file explorer type window pane 6
member references 3
PropertyDescriptor 11
type converter 4
XNA game window as a form control ? 5

Back
Top