Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Latest commit

 

History

History
63 lines (43 loc) · 2.14 KB

README.md

File metadata and controls

63 lines (43 loc) · 2.14 KB

🌐 Koj I18N

This repository contains our internationalization files, synced every hour from Google Sheets, so they're version controlled i18n files with git. On built time, our website fetches them from here.

Update CI Trigger CI

⭐ How it works

Every hour, a GitHub Actions workflow generates the files in the ./locales directory from a Google Sheets spreadsheet with the following layout:

key en-ch de-ch
key1 Value English Value German

In this spreadsheet, the cell A1 should be "key", and B1...X1 should be language codes.

The generated file ./locales/de-ch.json, for example, would be:

{
  "key1": "Value German"
}

Configuration

The following environment variables are required:

You can also create a .i18nrc file in the root of your project instead, with the keys sheetId and buildWebhook:

{
  "sheetId": "example",
  "buildWebhook": "https://example.com/post"
}

👩‍💻 Development

Run process locally:

npm run start

📄 License

The code in this repository, with the exception of the locales folder, are licensed under MIT.

The contents of the locales folder are licensed under CC-BY-4.0.

Koj

An open source project by Koj.
Furnish your home in style, for as low as CHF175/month →