public java.lang.String getDetectedLanguageCode() {
      java.lang.Object ref = detectedLanguageCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        detectedLanguageCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
<pre>
The BCP-47 language code of source text in the initial request, detected
automatically, if no source language was passed within the initial
request. If the source language was passed, auto-detection of the language
does not occur and this field is empty.
</pre>

<code>string detected_language_code = 4;</code>

@return The detectedLanguageCode.
java-translate/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Translation.java