Managing translations of an app, a web site… can be very painful.

Indeed, we have to think about how new translations are added into the app, what about the updated ones and all that with the lowest cost as possible. Yes, the lowest cost, the less time to waste by the developer and by the product owner !

That takes a lot of time !

Just imagine that case i’m sure you already know. The product owner wants to add a new functionality to the app and brings with it new translations in 10 different languages. At the moment to develop the functionality, you have to think about the keys that will be used inside the i18n library you use, and copy-paste each message. That takes a lot of time and it’s not really funny to do that !

A simple tool to manage translations ?

And what about a simple tool that centralizes the translations accessible for both product owners and developers ? Build it by your own ? No, very costly.

What do we need for that tool ? An access for users with permissions, a user interface that allow to easily add, edit and remove messages and a little button to export all theses messages in a JSON file.

Google Sheet, seriously ?

Well, there is a solution. Google Sheet. Seriously ? Yes, as simple as that. Google Sheet can centralize all the translated messages and handle the permissions to access or to edit the file. But where is the little button that generates the JSON file ? Did you that you can use add-ons with Google Sheet ? Me, I didn’t know until I found an add-on in the market place of GSuite. Export Sheet Data : https://gsuite.google.com/marketplace/app/export_sheet_data/903838927001


How to use the power of Google Sheet and Export Sheet Data it’s add-on ?

Organize the translation in the Google Sheets

First of all, the translations will handle 3 languages : English (en), French (fr), Spanish (es).

Let’s assume that there are 2 kinds of translations :

generic : simple words that can be used several times with no context (Edit, Save, Add, Delete, Hello, Good Bye, Houses, Cars….)

contextual: from simple word to long sentence that can appear often once within a special context (page, functionality, section…)

Well, I suggest to group the translations according to these kinds (generic or contextual).

Each context will be represented by a sheet in the Google Sheet Document.

About generic case, I suggetst to split into several sheets (action, state (Loading, Saving…), greetings, Country…).

Let’s create named tabs. “actions”, “state”, “greetings” and “shop-list”.

The name of the sheet (or tab) will be in lowercase as it will be used as a key for the translations.

Then, in each sheet, the first column is named “key”. It will be used to build the translations keys :

{tab_name}.{key}

The following columns are the language ones. “en”, “fr” and “es”.

Image for post

The tab “actions”

Image for post

The tab “state”

Image for post

The tab “greetings”

Image for post

The tab “shop’list”

#google-sheet-add-ons #productivity #vue-i18n #google-sheets #vuejs #vue

Manage i18n translations from Google Sheet
2.30 GEEK