diff --git a/.changeset/early-eagles-float.md b/.changeset/early-eagles-float.md new file mode 100644 index 0000000..5317198 --- /dev/null +++ b/.changeset/early-eagles-float.md @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index eb67f1e..ee26645 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,17 @@ 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 @@ -26,7 +26,7 @@ $ yarn add -D linguify 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. @@ -43,24 +43,26 @@ $ linguify init * `defaultLocale`: default locale to your application. + * `useSingleFile`: determines to use one translation file for each locale or not. +
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. @@ -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 ```