By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,727 Members | 768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,727 IT Pros & Developers. It's quick & easy.

Check string language

P: n/a
Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?
Jan 29 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Jan 29, 12:24*pm, Cylix <cylix2...@gmail.comwrote:
Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?
Don't know a direct library, but there may be an indirect method:
Create some of simple text files for some specific languages of the
equilavent of your string via Babelfish.altavista.com or Google
Translation, then put each language's strings into each text file.

Then under your project you can compare the any string with language
within these language-specific text files which you want to know.

Hope this helps.
Jan 29 '08 #2

P: n/a
Hi,

The language of ?
http://msdn2.microsoft.com/en-us/lib...re(VS.80).aspx
could be what you are looking for...


"Cylix" <cy*******@gmail.coma écrit dans le message de news:
48**********************************...oglegroups.com...
Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?

Jan 29 '08 #3

P: n/a
Oups, looks like Kimiraikkonen understood much better (you don't want to
place the computer current language setting in a string but to check in
which language could be written a particular string of text ?)...

Don't know about 3rd party but :

- you could first quickly check based on letters i.e. if you see a
particular unicode charset it could give a first indication (for example if
you have chinese characters, cyrillic characters, latin characters it could
give a first clue).

- if you have then characters that are used in a fair number of languages
you could :
- either check based on basic words frequency (for example "this",
"that" ,"the", "it", etc... is more likely frequent in English)
- also letter frequency could be perhaps an indication

You may want to give some more details. For example on a web site, you could
also have lang attributes that are supposed to tell in which language is a
particular page/section (for use by screen readers for example). If you get
some text from there, you could then also check this info...

--
Patrice

"Patrice" <http://www.chez.com/scribe/a écrit dans le message de news:
OI**************@TK2MSFTNGP02.phx.gbl...
Hi,

The language of ?
http://msdn2.microsoft.com/en-us/lib...re(VS.80).aspx
could be what you are looking for...


"Cylix" <cy*******@gmail.coma écrit dans le message de news:
48**********************************...oglegroups.com...
>Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?


Jan 29 '08 #4

P: n/a
Also :
http://tnlessone.wordpress.com/2007/...e-meets-human/

and more generally :
http://www.google.fr/search?hl=fr&q=...+natural&meta=

--
Patrice

"Patrice" <http://www.chez.com/scribe/a écrit dans le message de news:
eS**************@TK2MSFTNGP06.phx.gbl...
Oups, looks like Kimiraikkonen understood much better (you don't want to
place the computer current language setting in a string but to check in
which language could be written a particular string of text ?)...

Don't know about 3rd party but :

- you could first quickly check based on letters i.e. if you see a
particular unicode charset it could give a first indication (for example
if you have chinese characters, cyrillic characters, latin characters it
could give a first clue).

- if you have then characters that are used in a fair number of languages
you could :
- either check based on basic words frequency (for example "this",
"that" ,"the", "it", etc... is more likely frequent in English)
- also letter frequency could be perhaps an indication

You may want to give some more details. For example on a web site, you
could also have lang attributes that are supposed to tell in which
language is a particular page/section (for use by screen readers for
example). If you get some text from there, you could then also check this
info...

--
Patrice

"Patrice" <http://www.chez.com/scribe/a écrit dans le message de news:
OI**************@TK2MSFTNGP02.phx.gbl...
>Hi,

The language of ?
http://msdn2.microsoft.com/en-us/lib...re(VS.80).aspx
could be what you are looking for...


"Cylix" <cy*******@gmail.coma écrit dans le message de news:
48**********************************...oglegroups.com...
>>Is there any existing method in VB.NET or any 3-third party function
can find out the language in a string?
Let say, isChinese? isFrench?



Jan 29 '08 #5

P: n/a
Thanks Patrice anyway.

Actually, the method mention above is a large project that I cannot
effort.
My problem is quite simple, I a string from the email subject.
It may include three types of charater, english letter, chinese
letter, others.
I would like to trim the string have english letters and chinese
letters only.
Jan 31 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.