I am making automation which automatically translate Japanese to English through call script , GAS.
I want to make system that when puting some Japsense words in one column, English is returned to another column,
So, could you tell me GAS code in this case?
Hi @T-Shigenori
Maybe this ?
Class LanguageApp | Apps Script | Google Developers
Note this is a Google Apps Script question, not AppSheet ๐
// The code below will write "Esta es una prueba" to the log.
var spanish = LanguageApp.translate('This is a test', 'en', 'es');
Logger.log(spanish);
the above link , how should I pass arguments from appsheet to GAS code function?
the above example, 'This is a test' is fixed word, how should I revise code for passing arguments from Appsheet?
On the other hand, another web site shows some example,
function translateJPtoEN() {
//็ฐกๅใชๆฅๆฌ่ชใฎๆ็ซ ใ็ฟป่จณใใ
let text = "ใใณใใซใๆใใใจใใใใฏ้ชๅฝใ ใฃใใ";
//translate้ขๆฐใงๆฅๆฌ่ชโ่ฑ่ชใซ่ฑ่จณ
let transText = LanguageApp.translate(text,'','en');
//็ฟป่จณใใ่ฑๆใใญใฐ่กจ็คบใใ
console.log(transText);
}
the above case, is it possible to revise it to pass the arguments from appsheet to code?
OK.
You may want to consider using the "Call a script" and "return value".
Here is the documentation:
Call Apps Script from an automation - AppSheet Help
The section "Add and configure the "Call a script" task in a bot" indicates how to pass parameter to your function translateJPtoEN.
Then, you can use this if you need it:
Use return values from Apps Script tasks - AppSheet Help
User | Count |
---|---|
37 | |
30 | |
29 | |
20 | |
18 |