# IRPCObjectOperations.DetectTextLanguage

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DetectTextLanguage/

Badges: `Vault API / core` `write` `session or assertion` `returns metadata structure version`

Detects the language of a plain text.

- **Service:** [Objects, versions, properties and files](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/index.md) `MFiles.IRPCObjectOperations`
- **gRPC method:** `/MFiles.IRPCObjectOperations/DetectTextLanguage`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/detect-text-language`
- **Request:** [`DetectTextLanguageRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DetectTextLanguage/index.md#request)
- **Response:** [`DetectTextLanguageResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/DetectTextLanguage/index.md#response)
- **Book and level:** Vault API, core
- **Kind:** write
- **Session:** Required: a session (mfiles-session-id-bin metadata) or a session assertion (x-mf-session-assertion metadata).
- **Idempotent:** no
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="request"></a>

## Request: DetectTextLanguageRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `text_content` | `string` | The plain text input. |

<a id="response"></a>

## Response: DetectTextLanguageResponse

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `language_detection_result` | [`LanguageDetectionResult`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.LanguageDetectionResult/index.md) | Structure containing the language and detection confidence. |
| `language_detection_result.language` | `string` | The detected language specified by ISO 639-1 Language Code. |
| `language_detection_result.confidence` | `uint32` | The confidence of the detected language which represents a percentage. |
