From c6a16e4a2b62278acd472bd63845538980c5f659 Mon Sep 17 00:00:00 2001 From: Adel Bassiony Date: Tue, 26 Dec 2023 22:36:32 +0200 Subject: [PATCH] Improved documentation in readme file --- README.md | 15 ++++++++++++--- package.json | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3caa81b..66cff82 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ const i18xs = new I18XS({ fallbackLocale: 'en', rtlLocales: ['ar'], localization: { - Hello_World: 'Hello World', + 'Hello_World': 'Hello World', // ... more key-value pairs }, }) @@ -105,6 +105,15 @@ The I18XS package comes with a comprehensive set of features designed to make in For each language supported by your application, create a corresponding JSON file within a locales directory. These files should be named using the locale's identifier, such as en.json for English, ar.json for Arabic, etc. Each file contains key-value pairs for localized strings. + Example structure for the locales folder: + + ``` + locales + ├── en.json + ├── fr.json + └── ar.json + ``` + Example structure for en.json: ```json @@ -158,7 +167,7 @@ The I18XS package comes with a comprehensive set of features designed to make in fallbackLocale: 'en', rtlLocales: ['ar'], localization: { - Hello_World: 'Hello World', + 'Hello_World': 'Hello World', // ... more key-value pairs }, localesDir: './path/to/locales/folder', @@ -177,7 +186,7 @@ The I18XS package comes with a comprehensive set of features designed to make in fallbackLocale: 'en', rtlLocales: ['ar'], localization: { - Hello_World: 'Hello World', + 'Hello_World': 'Hello World', // ... more key-value pairs }, localesDir: './path/to/locales/folder', diff --git a/package.json b/package.json index 733c032..842a393 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "i18xs", - "version": "0.6.0", + "version": "0.7.0", "description": "A lightweight and simple package for i18n and localization for node.js", "main": "build/index.js", "types": "build/index.d.ts",