@ditsmod/i18n
v2.13.1
Published
Ditsmod module to integration with i18n (internalization)
Downloads
17
Readme
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],
];