{"__v":0,"_id":"55abdc9b0685ce0d0049fbb8","category":{"__v":21,"_id":"55a7aee94a33f92b00b7a154","pages":["55a7aee94a33f92b00b7a156","55a7ea403efe0c2f0074cb75","55a80eb23ec2ec0d00bd66ea","55a811fc6e61e619004f703e","55a8c513cf45e1390093f18c","55a8d9fa27a17d210052516d","55a8f048cf45e1390093f248","55aba4ba63a6b60d006616e1","55abab0a0685ce0d0049fb8d","55abb04da36ccd0d00fdebc1","55abc1cc63a6b60d006616f4","55abcdbd63a6b60d006616fa","55abd36763a6b60d00661700","55abd50ea36ccd0d00fdebdb","55abd8c3a36ccd0d00fdebdf","55abd9cc0685ce0d0049fbb5","55abdb6b63a6b60d00661706","55abdc9b0685ce0d0049fbb8","55c1f5fca131980d005be95b","55fac407bc972f0d0005f644","569f68e766a5640d00efa52d"],"project":"55a7aee84a33f92b00b7a150","version":"55a7aee84a33f92b00b7a153","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-16T13:17:29.102Z","from_sync":false,"order":2,"slug":"endpoints","title":"Endpoints"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"55a7aee84a33f92b00b7a150","user":"55a7ae50bf1be93100d89df1","version":{"__v":6,"_id":"55a7aee84a33f92b00b7a153","project":"55a7aee84a33f92b00b7a150","createdAt":"2015-07-16T13:17:28.411Z","releaseDate":"2015-07-16T13:17:28.411Z","categories":["55a7aee94a33f92b00b7a154","55a7fefa3efe0c2f0074cbdf","55a8fb10c8bd450d000dd130","55a936b1cf45e1390093f362","55abddeaa36ccd0d00fdebe1","5624db675a86b423009462e1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-19T17:21:31.430Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl https://api.aylien.com/api/v1/language \\\n   -H \"X-AYLIEN-TextAPI-Application-Key: [[app:key]]\" \\\n   -H \"X-AYLIEN-TextAPI-Application-ID: [[app:id]]\" \\\n   -d text=\"Hablas%2Bespa%C3%B1ol%3F\""},{"code":"textapi.language({\n  text: \"Hablas español?\"\n}, function(error, response) {\n  if (error === null) {\n    console.log(response);\n  }\n});","language":"javascript"},{"code":"language = client.Language({\"text\": \"Hablas español?\"})\nprint language","language":"python"},{"code":"<?php\n$language = $textapi->Language(array('text' => 'Hablas español?'));\nvar_dump($language);\n?>","language":"php"},{"code":"LanguageParams.Builder builder = LanguageParams.newBuilder();\nbuilder.setText(\"Hablas español?\");\nLanguage language = client.language(builder.build());\nSystem.out.println(language);","language":"java"},{"code":"language = client.language(text: \"Hablas español?\")\nputs language","language":"ruby"},{"code":"text := \"Hablas español?\"\nlanguageParams := &textapi.LanguageParams{Text: text}\nlanguage, err := client.Language(languageParams)\nif err != nil {\n\t\tpanic(err)\n}\nfmt.Printf(\"%v\\n\", language)","language":"go"},{"code":"string text = \"Hablas español?\";\n\nvar lang = client.Language(text: text);\n\nConsole.WriteLine(lang.Lang);","language":"csharp"}]},"results":{"codes":[{"name":"","code":"{\n  \"text\":\"Hablas+español?\",\n  \"lang\":\"es\",\n  \"confidence\":0.9999981087029495\n}","language":"json","status":200}]},"settings":"","auth":"required","params":[{"_id":"55abdb6b63a6b60d00661707","ref":"","in":"query","required":false,"desc":"Text to analyze","default":"","type":"string","name":"text"},{"_id":"55a8f048cf45e1390093f24a","ref":"","in":"query","required":false,"desc":"URL to analyze","default":"","type":"string","name":"url"}],"url":"/language"},"isReference":false,"order":9,"body":"**Language Detection** detect the language of any text or URL swiftly and accurately, and returns it as an [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code.","excerpt":"/language","slug":"language","type":"get","title":"Language Detection"}

getLanguage Detection

/language

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

text:
string
Text to analyze
url:
string
URL to analyze

Examples


Result Format


Documentation

**Language Detection** detect the language of any text or URL swiftly and accurately, and returns it as an [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}