이유혁

Merge branch 'develop' of ssh://khuhub.khu.ac.kr:12959/2015104204/OSS_Project_Chatbot into develop

Showing 1 changed file with 7 additions and 4 deletions
......@@ -72,9 +72,12 @@ function handleEvent(event) {
//번역은 한국어->영어 / 영어->한국어만 지원
if(detect_body.langCode == 'ko'||detect_body.langCode == 'en'){
source = detect_body.langCode == 'ko' ? 'ko':'en';
target = source == 'ko' ? 'en':'ko';
if(detect_body.langCode == 'ko'||detect_body.langCode == 'en'||detect_body.langCode=='ru'||detect_body.langCode=='ja'){
source = detect_body.langCode;
if(source!='ko'){
target='ko';
}
// target = source == 'ko' ? 'en':'ko';
//papago 번역 option
var options = {
url: translate_api_url,
......@@ -102,7 +105,7 @@ function handleEvent(event) {
else{
result.text = '언어를 감지할 수 없습니다. \n 번역 언어는 한글 또는 영어만 가능합니다.';
client.replyMessage(event.replyToken,result).then(resolve).catch(reject);
}
}
}
......