@ditsmod/i18n

2.11.0 • Public • Published

About the project

Ditsmod module to support i18n (internalization).

Settings

Recommended directory tree for current module:

└── modulename
    ├── ...
    ├── locales
    │   ├── current
    │   │   ├── _base-en
    │   │   ├── de
    │   │   ├── fr
    │   │   ├── pl
    │   │   ├── uk
    │   │   └── index.ts
    │   └── imported
    │       ├── one
    │       │   ├── de
    │       │   ├── fr
    │       │   ├── pl
    │       │   └── uk
    │       ├── two
    │       │   ├── de
    │       │   ├── fr
    │       │   ├── pl
    │       │   └── uk
    │       └── index.ts

Where _base-en - this is the base translation from which all other translations for the current module branch. And one and two this are external modules that alsow has @ditsmod/i18n integration. File index.ts has translation groups:

import { TranslationGroup } from '@ditsmod/i18n';

import { Common } from './en/common.js';
import { CommonUk } from './uk/common.js';
import { Errors } from './en/errors.js';
import { ErrorsUk } from './uk/errors.js';

export const current: TranslationGroup[] = [
  [Common, CommonUk],
  [Errors, ErrorsUk],
];

Readme

Keywords

Package Sidebar

Install

npm i @ditsmod/i18n

Weekly Downloads

2

Version

2.11.0

License

MIT

Unpacked Size

71.4 kB

Total Files

61

Last publish

Collaborators

  • ktretiak