1.3.0 • Published 27 days ago

linguify v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
27 days ago

linguify

Linguify translation files manager

Getting started

Installation

Via npm

npm install linguify --save-dev

Via pnpm

pnpm add -D linguify

Via yarn

yarn add -D linguify

Usage

  1. Initiate Linguify with the init command
linguify init
  • This will create linguify.config.json file at the root of your project.
  1. Modify the following values inside linguify.config.json:

  • localesPath: Path to application locales folder.

  • locales: Supported locales by your applications.

    Note: It is better to use ISO-639 language codes.

  • defaultLocale: default locale to your application.

  • useSingleFile: determines to use one translation file for each locale or not.

  1. Start linguify.
linguify

or

linguify start
  • Linguify server port can be changed using -p or --port option following the desired port
linguify -p 3000
  • Note: Updating linguify.config.json while Linguify runs requires restarting it before affecting it.

Import & Export translations

Linguify can import from or export to Excel translations file (xlsx).

Import translations

linguify import
  • Note: the file's first row must contain locales names, and the first column must be named key. It is advised to first use export to get a translations xlsx file.

Export translations

linguify export

Both commands have an option to pass the exact path of the translations file --path <PATH>, if path not passed it will try to import from or export to translations.xlsx from localesPath

How it works?

Linguify first validated the user config, then scans the localesPath for namespaces, read this article from i18next documentation if not sure how it works.

It uses defaultLocale as the base of translations and namespaces, and copies missing translations from defaultLocale namespaces to others. then you can modify them from the ui.

the sync operation happenes everytime Linguify starts, to sync translations manually you can use sync command.

linguify sync

Please open an issue if any bugs arise. and any working pull request is welcome.

Happy Internationalization!

1.3.0

27 days ago

1.2.2

2 months ago

1.2.1

3 months ago

1.2.0

5 months ago

1.1.0

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago