IMG-LOGO

How to get current culture language in ASP.Net C#?

andy - 26 Jul, 2013 4257 Views 0 Comment

If you develop a multi languages on your current web development website, you might want to know how to get the current language or culture in C# / CSharp. In this tutorial, you will learn how you can get the information with one single line only.

To get the culture information, you can run the following function

public string GetCurrentCulture(){
    return System.Threading.Thread.CurrentThread.CurrentCulture.Name;
}

Comments

There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.

Related Articles

How to remove html tags from string in c#?

Sometimes you need to remove HTML tags from string to ensure there are no dangerous or malicious scripts especially when you want to store the string or data text into the database.