{"id":48940,"date":"2022-11-20T06:06:56","date_gmt":"2022-11-20T06:06:56","guid":{"rendered":"https:\/\/developer.kore.ai\/v9-3\/?p=48940"},"modified":"2022-12-01T07:03:33","modified_gmt":"2022-12-01T07:03:33","slug":"add-and-enable-a-new-language-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/api-guide\/add-and-enable-a-new-language-api\/","title":{"rendered":"Add and Enable a New Language API"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div class=\"w-separator size_small\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To initiate the addition and enablement of a new language for a virtual assistant.<\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Method<\/b><\/td>\n<td>POST<\/td>\n<\/tr>\n<tr>\n<td><b>Endpoint<\/b><\/td>\n<td>\n<p><span style=\"font-weight: 400\"><code>https:\/\/{{host}}\/api\/version-Id\/public\/bot\/botId\/language<\/code><\/p>\n<p><\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Content Type<\/b><\/td>\n<td><code>application\/json<\/code><\/td>\n<\/tr>\n<tr>\n<td><b>Authorization<\/b><\/td>\n<td>\n<p><code>auth: {{JWT}}<\/code><\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/api-guide\/apis\/#Generating_the_JWT_Token\" rel=\"noopener noreferrer\" target=\"_blank\">How to generate the JWT Token<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><b>API Scope<\/b><\/td>\n<td>\n<ul>\n<li>Bot Builder: Language Configuration<\/li>\n<li>Admin Console: Language Settings > Language Management<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">host<\/span><\/td>\n<td>The environment URL. For example, <code>https:\/\/bots.kore.ai<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<pre class=\"code-limit-400px\">\r\ncurl -X POST \\\r\nhttps:\/\/{{host}}\/api\/public\/users \\\r\n-H 'Content-Type: application\/json' \\\r\n-H 'auth: YOUR_JWT_ACCESS_TOKEN' \\\r\n-d '[\r\n{\r\n\"enableLanguage\" : \"<language_code>\",\r\n\"langDefinitionMode\": {\r\n\"baseLanguage\": \"language_code\u201d,\r\n\"Type\": \"advancedConfig\/fileUpload\",\r\n\"fileId\":\"<file ID>\",\r\n\"preferredData\":{\r\n\"Training\": true\/false,\r\n\"Faqs\": true\/false,\r\n\"ontology\": true\/false,\r\n\"smalltalk\": true\/false,\r\n\"traits\": true\/false\r\n}\r\n},\r\n\"multiLingualConfigurations\":{\r\n\"nluLanguage\": \"language_code\",\r\n\"inputTranslation\": true\/false,\r\n\"responseTranslation\": true\/false\r\n}\r\n}]<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Body_Parameters\">Body Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Sub-parameter<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<th><b>Mandate<\/b><\/th>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">enableLanguage<\/span><\/td>\n<td><\/td>\n<td>The language to be enabled based on the language code.<\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">langDefinitionMode<\/span><\/td>\n<td><\/td>\n<td><\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><span style=\"font-weight: 400\">langDefinitionMode.baseLanguage<\/span><\/td>\n<td>Base language of the Virtual Assistant.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><span style=\"font-weight: 400\">langDefinitionMode.type<\/span><\/td>\n<td>Type of language enablement <b>Basic<\/b>, <b>advancedConfig<\/b>, or <b>fileUpload<\/b>.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><span style=\"font-weight: 400\">langDefinitionMode.fileId<\/span><\/td>\n<td>The <b>file ID<\/b> for handling the file upload if the <b>fileUpload<\/b> language enablement is selected.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><span style=\"font-weight: 400\">langDefinitionMode.preferredData<\/span><\/td>\n<td>If the <b>advancedConfig<\/b> language enablement is selected, the True\/False configuration setting for &#8220;training&#8221;,                                                               &#8220;faqs&#8221;,                                                                          &#8220;ontology&#8221;,                                                                              &#8220;Smalltalk&#8221; and                                                                    &#8220;traits&#8221; keys should be included.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td>multiLingualConfigurations<\/td>\n<td><\/td>\n<td><\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>multiLingualConfigurations.nluLanguage<\/td>\n<td>Refers to the language code of the bot language.<\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>multiLingualConfigurations.inputTranslation<\/td>\n<td>Refers to True\/False setting for the input language translation to English.<\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>multiLingualConfigurations.responseTranslation<\/td>\n<td>Refers to the True\/False setting for the response language translation to English.<\/td>\n<td>Required<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<p>For success case:<\/p>\n<p><code>[{<br \/>\n\u201cmessage\u201d: \u201cEnabled <language> language successfully\u201d,<br \/>\n\u201cconfigurationDetails\u201d: {<br \/>\n\"dialogs\":3,<br \/>\n\"alerts\":0,<br \/>\n\"actions\":0,<br \/>\n\"knowledgetTasks\":0,<br \/>\n\"smallTalk\":1,<br \/>\n\"panels\":0,<br \/>\n\"widgets\":0<br \/>\n}<br \/>\n}]<\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To initiate the addition and enablement of a new language for a virtual assistant. &nbsp; Method POST Endpoint https:\/\/{{host}}\/api\/version-Id\/public\/bot\/botId\/language Content Type application\/json Authorization auth: {{JWT}} See How to generate the JWT Token. API Scope Bot Builder: Language Configuration Admin Console: Language Settings > Language Management &nbsp; Path Parameters Parameter Description host The environment URL. For...","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-48940","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/48940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/comments?post=48940"}],"version-history":[{"count":23,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/48940\/revisions"}],"predecessor-version":[{"id":49206,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/48940\/revisions\/49206"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/media?parent=48940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/categories?post=48940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/tags?post=48940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}