Skip to content

Commit

Permalink
use single file
Browse files Browse the repository at this point in the history
  • Loading branch information
rawand-faraidun committed Nov 27, 2023
1 parent 2598385 commit 8161a2e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .changeset/early-eagles-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'linguify': minor
---

Use single translation file:
* allow to have one translation file for each locale instead of a file for each namespace
* `useSingleFile` config option
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ Linguify translation files manager

Via npm
```bash
$ npm install linguify --save-dev
npm install linguify --save-dev
```

Via pnpm
```bash
$ pnpm add -D linguify
pnpm add -D linguify
```

Via yarn
```bash
$ yarn add -D linguify
yarn add -D linguify
```

### Usage

1. Initiate Linguify with the `init` command

```bash
$ linguify init
linguify init
```

* This will create `linguify.config.json` file at the root of your project.
Expand All @@ -43,24 +43,26 @@ $ linguify init

* `defaultLocale`: default locale to your application.

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

<br />

3. Start linguify.

```bash
$ linguify
linguify
```

or

```bash
$ linguify start
linguify start
```

* Linguify server port can be changed using `-p` or `--port` option following the desired port

```bash
$ linguify -p 3000
linguify -p 3000
```

* Note: Updating `linguify.config.json` while Linguify runs requires restarting it before affecting it.
Expand All @@ -74,7 +76,7 @@ It uses `defaultLocale` as the base of translations and namespaces, and copies m
the `sync` operation happenes everytime Linguify starts, to sync translations manually you can use `sync` command.

```bash
$ linguify sync
linguify sync
```

<hr />
Expand Down

0 comments on commit 8161a2e

Please sign in to comment.