Is there a way to add the Google Translate button to a site

I’m looking for a simple way todo simple language translations on website?
I’m aware that we can’t embed code as simply as this

This solution from @david looks great, but I can’t find out how to get an API Key?

Can you link us to the solution?

Here is the link to his solution(s)

Just can’t find a way to get an API key?

It’s a little bit fiddly. Essentially you need to create a Google Cloud Account, enable the translation API, and generate an API key.

But, a question: do you need dynamic translations or are static translations good enough?

The only real reason to pay for a translation service is if you need dynamic (on-the-fly) translations.
Google give you 500k characters free per month, but if you have a large user base you can burn through that pretty quickly and it can start to get expensive.

So if most of your content is static text, then you’re probably better off doing manual translations and implementing a language switching mechanism. There are any number of ways you can go about that.

1 Like

I think Manual would be suitable for this project

What do you suggest as an approach?
A button that toggles language, then an “If/Then/Else” column that applies to the column label, based on the language selection?

Will all users be signed in, or do you need to cater for visitors as well?

There will be visitors too

Okay. The method I use only really works if all users are signed in, because the preferred language is saved in the User Profile.

Dealing with visitors is a little tricker, because you can’t do that. I could probably come up with something, but I’d need to experiment a bit.

I might defer to @kabookie here. She recently showcased a public App that had language support built in. Maybe she will be willing to share her method.


Can you tell me more about the Signed-in method?

Okay, so this is what I do:

  • I have a table called Strings
    – It has one row for each text snippet that’s used anywhere in my App
    – There is one column for the english version, and then a separate column for each supported language and the associated translation. Below is an example of what that looks like in an App where I am supporting 4 languages:

CleanShot 2023-02-16 at 23.05.33

  • In my user profiles table, I have a column that stores each users preferred language (en/ms/ta/zh)
  • Then back in my Strings table I have a single if-then-else column that determines the appropriate string for the signed in user by referring to their preferred language setting:

  • In the example above, the signed in user has his preferred language set as ms, so the if-then-else column returns all the Malay translations.
  • Now, back in my user profiles table I have a series of single value columns - one for each row in my Strings table. Each one returns N from start, where N is an incrementing number starting at zero. Here is what that looks like:

  • And finally, anywhere in the UI where I need some translated text, I just refer to the appropriate single value column in the user profile:

CleanShot 2023-02-16 at 23.16.02

It’s probably not the simplest method, but it gets the job done for me.


This is helpful, thanks a mil

Hello! Darren’s solution is very fast performance solution but if you want to add new language you need to do it in editor.
I’m used little bit different way:
You can create Translation table with each language in independent row and one column for language name and one column for each word which you need to translate.

In the user row, you need column with preferred language name and the relation to Translation table from user row preferred Language name to Translation table language name.
Also you need lookup column in the User table throw relation to translation table. And one lookup column(in the user row) for each word to be translated.

The goal of this way is the user can create new translation(new language) from app. But the performance will be less than Single value method(may be)

@Darren_Murphy how do we connect this with Glide Pages in order to see the language switcher on the page ?
also, is there a way to keep the translations for the content that was already translated ?

1 Like