Topics

Continued news on multilingualization using Google Cloud Translation API: Liberogic's trial and error

  • column

As reported in the news,Liberogic website is now multilingualI did it!

Currently, it only supports six languages, but if you can do one language, it's basically the same, and if you say it's possible to support all languages ​​that Google has, you can.

An experiment that began with "Let's try translating it first"

The trigger is simple.
"Web accessibility has increased, so why not try translating it?"
It's a light-hearted attitude.
However, doing it properly is surprisingly difficult. There are many things to consider behind the scenes, such as translation APIs, caches, builds, costs, cache updates, etc.
So, this multilingualizationGoogle Cloud Translation APIUsingAutomatic translation mechanism at build timeWe use the following.

Here's how it works

During buildscripts/translate-html-cache.mjswill run.
cache(translate-cache.json) if the text has already been translated, it will be used, and if not, it will be translated by calling Google's translation API.
The new translation will be added to the cache and will be reused next time.Cache not updated in automated deployment environmentTherefore, the key is to build and push locally once.

By doing so, you can avoid unnecessary API charges. (At first, you'll end up seeing the Google billing screen quite a bit...lol)

Combating translation quirks

If you try it, you'll come up with a variety of unique translations.
"Liberogic Inc." sometimes becomes "Liberogic Inc.", and sometimes just "Liberogic."

It's like, "Who is that?" GoogleGlossary functionI also tried this, but it only worked on a sentence-by-sentence basis, making it difficult to control using Liberogic Inc. alone.
So in the end,Implement your own replacement logicI did.

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

Furthermore, we've linked it to Google Spreadsheets so that the rules registered there can be automatically updated. This will protect both "Liberogic" and "Libero Grandpa."

How to choose a supported language

Initially, there are six languages ​​available: English, Chinese (traditional and simplified), French, Spanish, and Japanese.
The following conversation took place on Slack:

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

"Arabic CSS is a pain, so I'll do it later."

"No, let's not use Hindi because it would cause a huge increase in traffic."

...and so, I chose the language in a relaxed manner.
However, in these six languagesCovering over 75% of users worldwideApparently it's a possible calculation, I read it somewhere.

Is globalization really happening?

Here's a current example URL:

In the futureUp to about 30 languagesWe plan to increase the number (?).
We also plan to try our hand at Arabic, which is read from right to left (RTL compatible), in the future.
Stay tuned!

Summary: Easy multilingualization

This system is perfect for customers who want to try translating first.
Using the Google Cloud Translation API and cache operations, you can create a multilingual website at a relatively low cost.
Before aiming for full-scale localizationExperimental PhaseIt is also ideal as a

✳️ By the way

Please be patient and keep an eye on any strange wording or layout that may be caused by the multilingualization, as we are gradually correcting these. (Since release is our priority, we will fix the details with CSS at a later date!)

🌏 Final words

"Even if the translation isn't perfect, it will still reach the world."
It is with this same spirit that we continue to create websites today at Liberogic. Even if something isn't perfect, it can still get the message across. That's why we try it out ourselves first, before showing it to our customers. Failure is fine, experimentation is fine. Liberogic continues to conduct testing at the forefront of the web today.
While I was saying this, Google Translate is evolving every day!

Written by

Even though he's the company president, he's always a counterpart. He's a person who loves to understand new technology and finds joy in the moment something becomes more convenient, and is completely immersed in the field. His dream is to live in VR as a 20-year-old avatar when he's in his 80s.

Morimoto

Project Manager / Director / Founded in 2007

View this staff member's article

We pride ourselves on our reliable team structure and speedy response capabilities.

At Liberogic, our experienced staff proactively drive projects forward, which is why we are highly regarded by our clients.
We ensure that project managers and directors are properly assigned to ensure the smooth progress of the entire project. We prevent unnecessary cost increases from full commitments and allocate resources to the right people in the right places, and are well-known for the speed with which we can grasp the work content, create and submit estimates.

Please note that we do not actively engage in SES-style on-site work.

We support almost all major project management and chat tools, including Slack, Teams, Redmine, Backlog, Asana, Jira, Notion, Google Workspace, Zoom, and Webex.

Please contact us with any web-related concerns you may have.

Case Study