Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이유혁
/
OSS_Project_Chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
이유혁
2019-11-18 15:08:39 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c75eba968669024d52d7cd33919cbc5f5d8530c7
c75eba96
2 parents
2060968a
388d6bda
Merge branch 'develop' of
ssh://khuhub.khu.ac.kr:12959/2015104204/OSS_Project_Chatbot
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
app.js
app.js
View file @
c75eba9
...
...
@@ -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
);
}
}
}
...
...
Please
register
or
login
to post a comment