Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박찬수
/
enjoy_soccer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Ga Min Cha
2022-06-09 01:42:45 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a79420d2b2aaac79c1b39f5fd8a1a3f157eb9d4e
a79420d2
1 parent
ec7e71c7
Update transmessage.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletions
transmessage.js
transmessage.js
View file @
a79420d
...
...
@@ -33,4 +33,27 @@ function transMsg(replyMsg){
console
.
log
(
transMessage
);
}
});
}
\ No newline at end of file
}
var
replyMsg
=
"선수, 시즌, 순위, 리그, 손흥민, 네이마르, 1등"
function
transMsg_toEn
(
replyMsg
){
var
language
=
"en"
;
request
.
post
(
{
url
:
PAPAGO_URL
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded; charset=UTF-8'
,
'X-Naver-Client-Id'
:
`
${
PAPAGO_ID
}
`
,
'X-Naver-Client-Secret'
:
`
${
PAPAGO_SECRET
}
`
},
body
:
'source=ko&target='
+
language
+
'&text='
+
replyMsg
,
json
:
true
},(
error
,
response
,
body
)
=>
{
if
(
!
error
&&
response
.
statusCode
==
200
)
{
let
transMessage
=
body
.
message
.
result
.
translatedText
;
console
.
log
(
transMessage
);
}
});
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment