Newsroom
Breaking
NewsLyfe Breaking News ticker test — preview mode·Ceci est un test — aperçu du bandeau Breaking News·Dies ist ein Test — Vorschau des Breaking-News-Tickers·Esto es una prueba — vista previa del ticker de noticias·这是测试 — 突发新闻滚动条预览·이것은 테스트입니다 — 속보 티커 미리보기·Это тест — предварительный просмотр ленты срочных новостей·Це тест — попередній перегляд стрічки термінових новин·Dit is een test — voorbeeld van de Breaking News-balk·هذا اختبار — معاينة شريط الأخبار العاجلة
Guide/Translation/Google Translate

Google Translate

Step-by-step setup guide for Google Cloud Translation API

What is Google Cloud Translation?

Google Cloud Translation is the API behind Google Translate. NewsLyfe uses it to translate news articles on the fly — directly in your browser or app. The free tier allows up to 500,000 characters per month, which is more than enough for casual daily use.

💡
Quick Start:If you just want to try translation without any setup, Google offers a no-cost trial period when you first create a Cloud account. You won't be charged automatically after the trial ends.

Quick Start

Translation works out of the box in NewsLyfe once you add your API key. Here's the fastest path to get it working:

01

Open Google Cloud Console

Go to console.cloud.google.com and sign in with your Google account.

02

Create or select a project

Click the project dropdown at the top. Select an existing project or click New Project. Give it a name (e.g. "NewsLyfe").

03

Enable the Translation API

In the left sidebar go to APIs & Services → Library. Search for "Cloud Translation API" and click Enable.

04

Create an API key

Go to APIs & Services → Credentials. Click Create Credentials → API Key. Copy the generated key.

05

Add the key to NewsLyfe

Open NewsLyfe Settings → Translation → Google Translate. Paste your API key and save.

Advanced Setup

Restrict your API key (Recommended)

By default, a new API key has no restrictions — it could be used by anyone who gets hold of it. It's strongly recommended to restrict your key to only the Translation API and to your domain.

1

Go to Credentials

In Google Cloud Console, go to APIs & Services → Credentials and click on your API key.

2

Set API restrictions

Under API restrictions, select Restrict key, then choose Cloud Translation API from the list.

3

Set HTTP referrer restriction (optional)

Under Application restrictionsHTTP referrers, add newslyfe.com/* to limit usage to your account only.

Pricing & Free Tier

Free tier500,000characters / month

No credit card required for the free tier. Resets monthly.

Paid tier$20per 1 million characters

Only charged after exceeding the free 500K monthly limit.

📊
How many characters is 500K?A typical news article is around 2,000–5,000 characters. That means you can translate 100–250 full articles per month on the free tier alone.

Troubleshooting

403

Permission Denied

The Translation API isn't enabled for your project, or the API key is restricted incorrectly. Go to APIs & Services → Library and make sure Cloud Translation API is enabled.

401

Unauthorized / Invalid API Key

The API key is incorrect or has been deleted. Double-check the key in NewsLyfe Settings matches the one in your Google Cloud Console credentials.

429

Quota Exceeded

You've used your 500K free characters for the month. Translation will resume at the start of your next billing cycle, or you can set up billing to continue immediately.

Connection Error

NewsLyfe couldn't reach the Google API. Check your internet connection. If the issue persists, the Google API status page at status.cloud.google.com will show any ongoing outages.

API Key Security

Your API key is stored locally in your browser and is only sent to Google's servers for translation requests. NewsLyfe never stores or transmits your key to its own servers.

🔒
Never share your API key publicly.Don't post it on GitHub, in screenshots, or in support tickets. If it was exposed, delete it in Google Cloud Console and create a new one.
💳
Set a budget alert. In Google Cloud Console, go to Billing → Budgets & Alertsand set a monthly limit. You'll get an email before any unexpected costs.
🔑
Rotate your key periodically.It's good practice to generate a new API key every few months and delete the old one, especially if you've used it across multiple devices.