Subscribe to Foreign Blogs in your Native Language with Google Scripts
Han Han is the world’s most popular blogger but am not subscribed to his RSS feed as the content is written in Chinese. Earlier, some web apps did allow you to subscribe to foreign-language RSS feeds but ever since Google Translation API turned into a premium service, most of them have shut shop.
This is the Digital Inspiration RSS feed, automatically translated to French language.
You can build your own feed translation service using Google Scripts in less than a minute. This offers a few advantages:
- You can easily subscribe to foreign-language RSS feeds and they’ll display content translated in your native language. For instance, here’s Han Han’s blog feed translated to English.
- You can offer your blog’s RSS feed is multiple languages and thus reach a wider audience. For instance, the default RSS feed of Digital Inspiration is in English but, thanks to Google Scripts, you can also subscribe to the feed in Français, German, Hindi, Arabic, Español or any other language supported by Google Translate.
- Google Reader does include feed translation but the issue is that quite a few of us are using apps like Flipboard, Reeder, Feedly, etc. to keep up with feeds and none of them really offer language translation.
Now that you have a good idea of what we are trying to achieve, let’s see the script in action.
- Open the Google Script and choose File -> Make a copy to create a personal copy of that feed translation script into your Google Drive.
- Replace the source language (line #4), the target language (line #7) and the RSS feed URL (line #10) with your own values.
- Go to File -> Manage Versions and choose Save a new version. You may leave the description field blank.
- Go to Publish -> Deploy as Web App, choose “Anyone, even Anonymous” under “Who can access the app” and click the Deploy button.
Google Script will now offer you a link to the web app. That’s actually the new URL of the translated RSS feed which you can directly subscribe in Google Reader or any other news reader app like Reeder, Flipboard, etc.
If you wish to translate another RSS feed, or offer the same feed but in another language, just go back to step #1.
Google Translate API is now a paid service but if you access the same through Google Scripts, which we have done in this case, there isn’t any fee involved.
Also see: RSS Feeds Directory for Social Web
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.