473,395 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.

DR
how to determine what language a c# string is written in? is there any C#
method to take a string and return what language it is in? e.g. english,
hindi, spanish, etc.
Jan 29 '08 #1
2 4465
DR,

You can't tell definitively.

The best you could do is check each character in the string and then see
what code chart the character is a part of (you will have to find out which
code charts you want to support, as there is no way in .NET (AFAIK) that you
can find this out) and then make a determination from there.

The thing is, many characters are used interchangibly (for example, an
"a" is used in a number of languages), so you can't be sure what language
the code chart is used for.

In the end, you are better off having the user specify the language.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"DR" <so*******************@yahoo.comwrote in message
news:e0**************@TK2MSFTNGP06.phx.gbl...
how to determine what language a c# string is written in? is there any C#
method to take a string and return what language it is in? e.g. english,
hindi, spanish, etc.

Jan 29 '08 #2
DR wrote:
how to determine what language a c# string is written in? is there any C#
method to take a string and return what language it is in? e.g. english,
hindi, spanish, etc.
Not with 100% certainty.

If it is normal text in the languages, then you may be
able to deduce something from the frequencies of letters.

Arne
Jan 31 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Lars Eighner | last post by:
I believe it was here that I recently saw a discussion that pointed out that the language in the public identifier of a DTD referes to the language in which the DTD is written and has no bearing...
2
by: eikel | last post by:
Hi I am a newbie c# programmer, I would like to know how to make a function that switches between languages in windows XP/2000. The languages can be set manually in the language bar. Thanks for...
5
by: kuldeep | last post by:
Hi all, I have developed a application that supports localization in .net. It shows all the controls with english and hindi text depending on the culture selected. The application runs well on...
23
by: Xah Lee | last post by:
The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee, 2006-03-15 Let me summarize: The LISP notation, is a functional notation, and is not a...
0
by: PHPBob | last post by:
Hello, I am trying to run Languid language guesser - see http://languid.cantbedone.org/ I am not a perl programmer, and I have no idea how to get this script running. I am running perl scripts...
1
by: jackal_on_work | last post by:
Hi, I have a database and want to store data in Spanish and English. To accompish this: 1. Do i need to create separate tables for both the languages like items_en and items_sp? 2. If I opt...
1
by: DR | last post by:
how to determine what language a c# string is written in? is there any C# method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
1
by: DR | last post by:
how to determine what language a string is written in? is there any method to take a string and return what language it is in? e.g. english, hindi, spanish, etc.
6
by: Ole Nielsby | last post by:
Does C++ have a method of retrieving this? When launching my app, I want to select the appropriate language for ts GUI, based on the user's language setting. The frameworks wxWidgets and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.