Translate Column

That’s something worth the trial :clap:

I made a fork of yours and it did not work (hence the screenshot of the error). I used yours to test to see if it worked at all (with my api key, and yes, it worked fine).

1 Like

awesome.
You know you can translate the placeholder of your edit text into the user’s language !!! just leave Lang empty :rofl: :stuck_out_tongue_winking_eye:

2 Likes

Yes, but I did it in 5min & started working again yet lol :rofl:

Edit¹: @Manu.n added another column to placeholder, test it :sweat_smile:

1 Like

it does not work, disappointment :thinking:

image

2 Likes

Yep… I let it blank as it says to be to get local language …

Anyway, afterwards I see it. It was only a test

Thanks @david for the replit and @Manu.n for adapting it.

My wife doesn’t speak Spanish and my aunt doesn’t speak English which more times that I can count leaves me in the middle translating messages for them.

So… Thanks to this thread I came up with this. :arrow_down:

Video is in Spanish but I think you can get the idea.

Edit: This gave me the idea that it would be great if we could access the comment table and add an EC to show the comments in the users’ language.

10 Likes

Excellent thread and showcases everyone. I’m definitely going to play around wiith this and integrate it into some apps. Cheers :slight_smile:

4 Likes

Awesome!
How can I get a free API key?

Is this still working i try to follow the url inside it goes 404

Please try this in an Experimental Code column.

https://glide-translate-column.dvdsgl.repl.co/
2 Likes

@ThinhDinh does this have the cache enabled ?
Also, how does the cache actually work, do you know ?

For example :
if I add a variable based on a user selection, it translates the content for all the users that will select that language or the cache is local only for that particular user ?

I’ve noticed that if I do what I want it uses the API every time a user loads that page … what I created is something like this

col A = original text
col B = experimental code - with google translate API based on the user selection
col C = IF then else column - to display the default if no language was selected, I can make it mandatory at the beginning and remove this column

but still, it will take a lot of API calls and money if people start playing with the language option :))

Check out this template… free API.

1 Like

@Uzo great solution but I see it doesn’t keep the language on refresh and this is something I need to have as it is annoying to make a user select the language every time the app starts … and also as this apps are pwa’s they will load a lot

The language will reset to de User device language, so they don’t need to change anything… when they want to see another translation, they can switch it… If they are signed in… it will stay on the last choice… and if that is still not good for you… I can create an option to record IP and pull out the settings :wink:

I think that only caches for the particular user but might have to get @Jeff_Hager in here to confirm. So the question is “Does the column run on the client-side, Jeff?”

2 Likes

Yes, I’m pretty sure the Replit would run client-side. I think just like GitHub, it’s mostly just a code repository. Replit and Github don’t run the code on their servers, they just keep a copy and serve up the code to where it’s needed, and its ran at that destination. In this case, it’s served up to every individual device.

With that said, I think it’s possible that the results are cached for the duration of the session for each individual user. If a user closes the app and reopens it, even though the selected language may already be set, it’s still going to call the API at least once.

So I would assume that there will be an API call once for each user device…every time they reload the app or change the language. Still could end up being a lot of calls depending on how many users there are and how often they use the app.

3 Likes

I asked Mark this question a while back, and he confirmed that this is the case.

3 Likes

Where can I find the Key API?