
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
Detects language of the given text. Returns detected language codes and scores.
Using the .NET Core command-line interface (CLI) tools:
dotnet add package DetectLanguage
Using the NuGet Command Line Interface (CLI):
nuget install DetectLanguage
Using the Package Manager Console:
Install-Package DetectLanguage
From within Visual Studio:
When upgrading please check changelog for breaking changes.
For a comprehensive list of examples, check out the API documentation.
Before using Detect Language API client you have to setup your personal API key. You can get it for free by signing up at https://detectlanguage.com
using DetectLanguage;
DetectLanguageClient client = new DetectLanguageClient("YOUR API KEY");
DetectResult[] results = await client.DetectAsync("Dolce far niente");
If you need just a language code you can use DetectCodeAsync. It returns first detected language code.
string languageCode = await client.DetectCodeAsync("Dolce far niente");
It is possible to detect language of several texts with one request.
This method is significantly faster than doing one request per text.
To use batch detection just pass multiple texts to BatchDetectAsync method.
string[] texts = {"labas rytas", "good morning"};
DetectResult[][] results = await client.BatchDetectAsync(texts);
AccountStatus accountStatus = await client.GetAccountStatusAsync();
Language[] languages = await client.GetLanguagesAsync();
Detect Language API .NET Client is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
FAQs
Language Detection API Client for .NET (Official Library)
We found that detectlanguage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.