Skip to content

Commit

Permalink
Improved documentation in readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
3adel-bassiony committed Dec 26, 2023
1 parent 295471c commit c6a16e4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
})
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit c6a16e4

Please sign in to comment.