Topics

Follow-up to the news about multilingual support with Google Cloud Translation API: Liberogic's trial and error

  • column

As we shared in the news, we've made the Liberogic website multilingual!

Currently we support 6 languages, but honestly, once you've done one language, the rest is pretty much the same. If we wanted to, we could actually support every language Google has available.

Starting with "Let's try translating first"

It started simply.
"With web accessibility in mind and increasing traffic from overseas, why not just try translating?"
— that was the casual thinking.
But doing it properly turned out to be surprisingly complex. Translation APIs, caching, builds, costs, cache updates... there was far more "complicated behind-the-scenes work" than we imagined.
So for this multilingual rollout, we've adopted Google Cloud Translation API with automatic translation built into the build process.

How it works

At build time, scripts/translate-html-cache.mjs runs.
If translated text already exists in the cache (​translate-cache.json), it uses that; otherwise, it calls Google's translation API to translate.
New translations are added to the cache and reused next time. However, the cache is not reflected in automatic deployment environments, so the key is to build and push locally first.

This way, we avoid unnecessary API charges. (In the beginning, we spent a lot of time staring at the Google billing dashboard... ha!)

Fighting translation quirks

When you try it out, you get all kinds of quirky translations.
"Liberogic Inc." becomes "Liberlogic Inc." or sometimes "Libelogic..."

At this point, I have no idea who it is anymore. I tried Google's Glossary feature as well, but since it only works at the sentence level, it's difficult to control for "Liberogic" as a standalone term.
So in the end, I implemented custom replacement logic on our own.

en: [
  { from: /Liberlogic/g, to: 'Liberogic' },
  { from: /Libelogic/g, to: 'Liberogic' },
],
de: [
  { from: /Liberlogic/g, to: 'Liberogic' },
  { from: /Libelogic/g, to: 'Liberogic' },
],

We've also integrated with Google Sheets, so rules registered there are automatically reflected. Now we can uphold both "Liberogic" and "Liberogic's" standards.

How to Choose Supported Languages

Initially, we had 6 languages since English, Chinese (Traditional and Simplified), French, Spanish, and Japanese were already available.
We even had this conversation on Slack.

"What about Russian? How about Korean and Thai and so on?"

"Arabic is tricky with CSS, so it can wait."

"No, Hindi would probably cause traffic to skyrocket, so let's skip it."

…and so we selected languages with a pretty casual approach.
That said, these 6 languages apparently cover over 75% of users worldwide, or so I read somewhere.

Actually, we're making more global progress than you might think?

Example URL as of now:

We plan to expand to around 30 languages in the future.
We're also planning to tackle right-to-left languages like Arabic (rtl support) eventually.
Stay tuned!

Summary: Making multilingual sites easy

This approach is perfect for customers who want to "try translation first!"
With Google Cloud Translation API and cache management, you can build a multilingual site at relatively low cost.
It's also ideal as an experimental phase before pursuing full localization.

✳️ By the way

We're working to fix any odd phrasing or layout issues that come with multilingual support, so we appreciate your patience as we make improvements. (We're prioritizing release, so we'll refine the details with CSS later!)

🌏 A final word


Translation doesn't have to be perfect to reach the world. With that spirit, Liberogic keeps building the Web. Perfect isn't always necessary—what matters is whether the message gets through. That's why we try things ourselves first, before they reach our clients. We embrace failure, we embrace experiments. Liberogic continues to test and verify on the frontlines of the Web.
And meanwhile, Google Translate just keeps getting better every day!

About the author of this article

A CEO who always acts as a true counterpart. Someone who loves understanding new technologies, finds joy in those moments when something becomes more convenient, and is a hands-on person who dives deep into projects. Excited about the technologies of tomorrow, enjoying new experiences at every stage of life.

Morimoto

Project Manager / Director / Founded in 2007

Read this staff member's article

Reliable team structure and responsive project management are our strengths

At Liberogic, our experienced staff actively drive projects forward, earning high praise from clients.
We carefully assign project managers and directors to ensure smooth project execution across all phases. We prevent unnecessary cost increases from over-commitment by deploying resources strategically, and we're known for speed in project understanding, estimation, and delivery.

* Please note that we do not actively pursue on-site SES-style staffing arrangements.

You can use virtually all major project management and chat tools, including Slack, Teams, Redmine, Backlog, Asana, Jira, Notion, Google Workspace, Zoom, Webex, and more.

Tell us about your web concerns.

Case Studies