Giter Club home page Giter Club logo

linguify's Introduction

linguify 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!

linguify's People

Contributors

rawand-faraidun avatar github-actions[bot] avatar ahmedbaset avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.