public sealed class DetectLanguageRequest : IMessage<DetectLanguageRequest>, IEquatable<DetectLanguageRequest>, IDeepCloneable<DetectLanguageRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Translation v3 API class DetectLanguageRequest.
Optional. The labels with user-defined metadata for the request.
Label keys and values can be no longer than 63 characters
(Unicode codepoints), can only contain lowercase letters, numeric
characters, underscores and dashes. International characters are allowed.
Label values are optional. Label keys must start with a letter.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDetectLanguageRequest\u003c/code\u003e class is used to send requests for language detection in the Google Cloud Translation v3 API, and it implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eDetectLanguageRequest\u003c/code\u003e documentation is 3.9.0, with versions ranging back to 2.2.0, all of which detail the class's usage for the Google.Cloud.Translate.V3 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDetectLanguageRequest\u003c/code\u003e class has properties like \u003ccode\u003eContent\u003c/code\u003e, \u003ccode\u003eLabels\u003c/code\u003e, \u003ccode\u003eMimeType\u003c/code\u003e, \u003ccode\u003eModel\u003c/code\u003e, and \u003ccode\u003eParent\u003c/code\u003e, which allow users to specify the input text, metadata, text format, detection model, and project/location, respectively.\u003c/p\u003e\n"],["\u003cp\u003eUsers can create instances of \u003ccode\u003eDetectLanguageRequest\u003c/code\u003e using either the parameterless constructor \u003ccode\u003eDetectLanguageRequest()\u003c/code\u003e or by providing an existing \u003ccode\u003eDetectLanguageRequest\u003c/code\u003e instance using \u003ccode\u003eDetectLanguageRequest(DetectLanguageRequest other)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eParent\u003c/code\u003e property within \u003ccode\u003eDetectLanguageRequest\u003c/code\u003e is essential as it requires the user to specify the project or location they're calling from, and it also sets resource name properties through the \u003ccode\u003eParentAsLocationName\u003c/code\u003e property.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Translation v3 API - Class DetectLanguageRequest (3.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.8.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.7.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.6.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.5.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.4.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.3.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.2.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.1.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/3.0.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/2.4.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/2.3.0/Google.Cloud.Translate.V3.DetectLanguageRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Translate.V3/2.2.0/Google.Cloud.Translate.V3.DetectLanguageRequest) \n\n public sealed class DetectLanguageRequest : IMessage\u003cDetectLanguageRequest\u003e, IEquatable\u003cDetectLanguageRequest\u003e, IDeepCloneable\u003cDetectLanguageRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Translation v3 API class DetectLanguageRequest.\n\nThe request message for language detection. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DetectLanguageRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DetectLanguageRequest](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DetectLanguageRequest](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DetectLanguageRequest](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Translate.V3](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3)\n\nAssembly\n--------\n\nGoogle.Cloud.Translate.V3.dll\n\nConstructors\n------------\n\n### DetectLanguageRequest()\n\n public DetectLanguageRequest()\n\n### DetectLanguageRequest(DetectLanguageRequest)\n\n public DetectLanguageRequest(DetectLanguageRequest other)\n\nProperties\n----------\n\n### Content\n\n public string Content { get; set; }\n\nThe content of the input stored as a string.\n\n### HasContent\n\n public bool HasContent { get; }\n\nGets whether the \"content\" field is set\n\n### Labels\n\n public MapField\u003cstring, string\u003e Labels { get; }\n\nOptional. The labels with user-defined metadata for the request.\n\nLabel keys and values can be no longer than 63 characters\n(Unicode codepoints), can only contain lowercase letters, numeric\ncharacters, underscores and dashes. International characters are allowed.\nLabel values are optional. Label keys must start with a letter.\n\nSee \u003chttps://cloud.google.com/translate/docs/advanced/labels\u003e for more\ninformation.\n\n### MimeType\n\n public string MimeType { get; set; }\n\nOptional. The format of the source text, for example, \"text/html\",\n\"text/plain\". If left blank, the MIME type defaults to \"text/html\".\n\n### Model\n\n public string Model { get; set; }\n\nOptional. The language detection model to be used.\n\nFormat:\n`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`\n\nOnly one language detection model is currently supported:\n`projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.\n\nIf not specified, the default model is used.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. Project or location to make a call. Must refer to a caller's\nproject.\n\nFormat: `projects/{project-number-or-id}/locations/{location-id}` or\n`projects/{project-number-or-id}`.\n\nFor global calls, use `projects/{project-number-or-id}/locations/global` or\n`projects/{project-number-or-id}`.\n\nOnly models within the same region (has same location-id) can be used.\nOtherwise an INVALID_ARGUMENT (400) error is returned.\n\n### ParentAsLocationName\n\n public LocationName ParentAsLocationName { get; set; }\n\n[LocationName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Translate.V3/latest/Google.Cloud.Translate.V3.DetectLanguageRequest#Google_Cloud_Translate_V3_DetectLanguageRequest_Parent) resource name property.\n\n### SourceCase\n\n public DetectLanguageRequest.SourceOneofCase SourceCase { get; }"]]