• Activity
  • Classifieds
    • annonces
    • Browse Ads
    • Edit Ad
    • Place Ad
    • Renew Ad
    • Reply to Ad
    • Search Ads
    • Show Ad
  • Groups
  • Home
  • Members
IT Skills You Need
No Result
View All Result
No Result
View All Result
IT Skills You Need
No Result
View All Result
Home Datascience

Translating with Google Sheets

admin by admin
3 November 2021
in Datascience
0 0
0
Translating with Google Sheets
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

Google Translate is an amazing feat of engineering, which uses artificial intelligence to translate speech and text from a chosen language into another. In most cases, Google Translate’s own interface embedded in Google Search or on translate.google.com suffices to get some ad-hoc thing translated quickly.
 
But in some cases, you want something more powerful and scalable to be able to translate in bulk. For coders, there’s the Translation API for instance. But what if you’re less technical, and still want to use Google Translate in a structured, more scalable environment?
 

Again, as in other Case Studies presented here, Google Sheets comes to the rescue!

Main formula:
=GOOGLETRANSLATE(B16, “en”, “fr”)
Here, the ‘B16’ part concerns the reference to the cell containing the text you want to translate.
After that, you add the source language — the language in which the original text is written — using the language’s abbreviation.
After that, you declare the target language — the language to which the source text has to be translated — again using that language’s abbreviation.
How to make this even better?
1. Drop-down lists for the languages
Other than formatting the file to your liking, you can create some drop-down lists for the Source and Target languages.
This will help you being more productive as you do not need to search for the language codes every time you want to change them. 
In my case, I used the Data Validation feature using as a criterion a List from a Range. First, I created a new sheet with all the Languages and their codes. Then, I used the column with the language names as my List for data validation.
Advantages of the drop-down list:
It can be sorted (in my case, I used the alphabetical sort in the Language Codes Sheet).
It is searchable.
Can auto-update if your data changes – see the TIP below
For your drop-down list to auto-update when you are adding new data on the criterion Range, use a formula like: =’Language Codes’!$A$2:$A 
Note that on the range defining the data that will be used for the drop-down list, I specify the beginning of the selection ($A$2: row 2 of column A) but I do not specify any row at the end of the selection (:$A).
I could have written the formula like this =’Language Codes’!$A$2:$A65 but then, every time I am adding new languages to the list I will need to update the Data Validation formula.
 2. VLOOKUP function to pick the language code
I have now the Language selected from the drop-down list but in the formula I need to have the Language Code and not the language name. Therefore, I am using the VLOOKUP function that is searching the Language Name in the Language Code Sheet and returns the Language Code corresponding to the selection.
VLOOKUP($B$11,’Language Codes’!A:B,2,FALSE) – Source Language
So it looks for the value in cell B11 (the source language) in the Sheet “Language Codes” on column A. Once it finds the Language, it will return the information on the next column on that specific row. The Language Code. If the language is set to English, this function will return “en”. 
VLOOKUP($B$15,’Language Codes’!$A:$B,2,FALSE) – Target Language
It looks for the value in cell B15 (the target language) in the Sheet “Language Codes” on column A. Once it finds the Language, it will return the information on the next column on that specific row. The Language Code. If the language is set to French, this function will return “fr”. 
So, starting from the formula definition on the yellow area, our complete formula will look like this now (check the color code on the formula definition to spot every part):
=GOOGLETRANSLATE(A16,VLOOKUP($B$11,’Language Codes’!A:B,2,FALSE),VLOOKUP($C$15,’Language Codes’!$A:$B,2,FALSE))
3. CLEAN ERRORS PROACTIVELY
Since we pre-populated the entire table with formulas, the rows where we do not have a text to be translated will bring an error message #VALUE! It is not an error per se but it will make our file look ugly. Therefore, we can use the =IFERROR function and instruct Google Sheets to discard all the errors and show instead of an empty cell. 
Since the function definition is =IFERROR(value, [value_if_error]), we will have to
replace the value part with out formula defined above 
replace the value_if_error part with “” – this is a way to writing an empty text … nothing between the quotation marks
Final formula:
=iferror(GOOGLETRANSLATE(A16,VLOOKUP($B$11,’Language Codes’!A:B,2,FALSE),VLOOKUP($B$15,’Language Codes’!$A:$B,2,FALSE)),””)

Yes, we are done. We will not complicate the formula more than that.
 
Register for FREE on https://zoran.cloud to use the Google Sheet file. If you want to make any changes or have it on your own Google Drive account, make a copy, use it and abuse it :-).
Zoran

Tags: Data science
The New Age of Healthcare: Future Of Virtual Health

The New Age of Healthcare: Future Of Virtual Health

16 November 2021

Using Cloud and AI Technologies to Make Data Driven Decisions For Monetization

22 December 2021
Examples of Using Kanban Boards with Data Visualization Tools

Examples of Using Kanban Boards with Data Visualization Tools

2 November 2021
Why Do an Agile Transformation

Why Do an Agile Transformation

1 December 2021
DevOps Dojo – Culture and Mindset

DevOps Dojo – Culture and Mindset

31 December 2021
Benchmarking CPU And GPU Performance With Tensorflow

Benchmarking CPU And GPU Performance With Tensorflow

29 November 2021
PySpark MLIB Library

PySpark MLIB Library

20 May 2022

What to Know About NLP

16 October 2020

5 Ways Machine Learning Can Boost Your Digital Marketing Efforts

12 November 2021

Complete Guide on Rest API with Python and Flask

20 January 2022

How to build an effective customer support knowledge base

29 April 2022

Punch above our weight

18 November 2020

Zapier report: Pandemic business boom

8 December 2021

Artificial Intelligence 101: How to get started

1 October 2017

4 communication styles and how to navigate them in the workplace

14 January 2022

5 HubSpot dashboard features you should be using

28 March 2022

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Categories

  • Agile
  • AI
  • AIOps
  • AIOps & Machine Learning
  • Artificial Intelligence
  • Automation
  • Big-Data
  • Business of DevOps
  • Datascience
  • DevOps
  • IT infrastructure monitoring
  • ITIL
  • Monitoring
  • Network monitoring
  • Non classé

Recent News

New SIEMENS Products From This Week’s Virtual Tour

New SIEMENS Products From This Week’s Virtual Tour

20 May 2022
The DataHour: Create Effective DS Notebooks and Communication

The DataHour: Create Effective DS Notebooks and Communication

20 May 2022
  • Activity
  • Classifieds
  • Groups
  • Home
  • Members

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Activity
  • Classifieds
    • annonces
    • Browse Ads
    • Edit Ad
    • Place Ad
    • Renew Ad
    • Reply to Ad
    • Search Ads
    • Show Ad
  • Groups
  • Home
  • Members

© 2022 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist