# GOOGLETRANSLATE with Arrayformula?

**URL:** <https://community.glideapps.com/t/googletranslate-with-arrayformula/15959>\
**Category:** Ask for Help\
**Created:** [September 17, 2020, 4:43pm UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959 "2020-09-17T16:43:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [September 17, 2020, 4:43pm UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/1 "2020-09-17T16:43:56Z")

</div>

Hey guys 👋🏼

Well, I’d like to add an option PT/EN, but I didn’t find a way to use GOOGLETRANSLATE with arrayformula

In my app people can add a text, and for this, gotta translate in each row…

Any way to do it?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 17, 2020, 6:16pm UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/2 "2020-09-17T18:16:20Z")

</div>

My first two thoughts are combining them in a text join then split them back later in the same single formula.

Another thought is to use a script, I have written one recently that would be great for you. I’ll share it tomorrow when I’m up.

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [September 17, 2020, 6:18pm UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/3 "2020-09-17T18:18:16Z")

</div>

> [@ThinhDinh](#):
>
> My first two thoughts are combining them in a text join then split them back later in the same single formula.

Even tho, I didnt find a way to do it with arrayformula

> [@ThinhDinh](#):
>
> Another thought is to use a script, I have written one recently that would be great for you. I’ll share it tomorrow when I’m up.

I’ll be greatful! 😌

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 18, 2020, 3:09am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/4 "2020-09-18T03:09:17Z")

</div>

Hi brother, here is the Sheet so you can test.

> **[Thinh Dinh's lab V2.0](https://docs.google.com/spreadsheets/d/1JzBrp4R1zK9CMfmTzWWcPPep9-ZCl3OXxgWu27NWCy8/edit#gid=157521683)**
>
> Robert Test
> 
> Project,Task,Project,Task,Combined
> A,siLxzsQURZK3QGl0Zhqg7w, yLz8ofPiQrC8Y6BYfpm.CQ,A,siLxzsQURZK3QGl0Zhqg7w,A - siLxzsQURZK3QGl0Zhqg7w
> jRzXZcVgQruv37w-gFQ6Kg, zp5bp3uIQoWwJYAH0a-vgQ,yLz8ofPiQrC8Y6BYfpm.CQ,...

The script:

```
  function Translate(e) {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getActiveSheet();
  //checks that we're on the correct sheet.
  if(sheet.getSheetName() == 'Translate') { 
    var active_cell = sheet.getActiveCell();
    var row = active_cell.getRowIndex();
    if(row > 1) {
    var PortugueseCell = sheet.getRange(row,2);
    var VietnameseCell = sheet.getRange(row,3);
    PortugueseCell.setFormula("=GOOGLETRANSLATE(A"+row+",\"en\",\"pt\"\)");
    //sheet.getRange("B"+row).setValue(sheet.getRange("B"+row).getValue());
    VietnameseCell.setFormula("=GOOGLETRANSLATE(A"+row+",\"en\",\"vi\"\)");
    //sheet.getRange("C"+row).setValue(sheet.getRange("C"+row).getValue());
    }
  }
}

```

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/65de2d14afec8f710467f3ce6cfab5e1216f8fc5.png)

When you input something in A, it will translate to B and C and the end result is a text, not a formula so it won’t run all over again when you refresh!

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [September 18, 2020, 3:13am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/5 "2020-09-18T03:13:25Z")

</div>

Thank you so much man!!

I just wonder if it will count as a GS edit/reload in glide 🤔

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 18, 2020, 3:14am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/6 "2020-09-18T03:14:02Z")

</div>

As it inputs new information I think that’s a yes…

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [September 18, 2020, 3:17am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/7 "2020-09-18T03:17:14Z")

</div>

Ok…while I have a few users thats ok, but my worry when it gets more n more

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 18, 2020, 3:19am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/8 "2020-09-18T03:19:13Z")

</div>

I would say it happens instantly after you input the original text so probably Glide can batch it in one update to the app so hopefully it doesn’t result in more reloads. I saw Jeff or David talking about this.

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [September 18, 2020, 3:20am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/9 "2020-09-18T03:20:41Z")

</div>

Yes, I’ll try then… thanks again bro!!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 18, 2020, 3:21am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/10 "2020-09-18T03:21:27Z")

</div>

Ping me when you need help bro, and take a rest as well, it’s late over there haha.

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [October 1, 2020, 5:20am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/11 "2020-10-01T05:20:25Z")

</div>

@ThinhDinh take a look in this formula 😮

> [@GOOGLETRANSLATE function](https://community.glideapps.com/t/googletranslate-function/1339/4):
>
> Hi @Alex_Calandrino, that’s strange that you are saying the solution from the article @Jeff_Hager suggested didn’t work. I’ve tried the formula below for my file - it translates complete column A from russian to german and it works perfectly. ARRAYFORMULA(TRIM(TRANSPOSE(SPLIT( GOOGLETRANSLATE(TEXTJOIN(". ", 1, A1:A), “RU”, “de”), “.”))))

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [October 1, 2020, 7:17am UTC](https://community.glideapps.com/t/googletranslate-with-arrayformula/15959/12 "2020-10-01T07:17:47Z")

</div>

Smart use of textjoin, thanks bro! 😍
