# curli-intl

> Typed internationalization (intl/i18n) library for TypeScript/JavaScript apps and Curli Framework.

Latest version **0.0.1** (published 2020-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install curli-intl
pnpm add curli-intl
yarn add curli-intl
bun add curli-intl
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-05-05 |
| First published | 2020-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 2 |
| Unpacked size | 20.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Carlos Juan Craviotto |
| Maintainers | curlirojo |
| Keywords | internationalization, intl, i18n, translations, translate, javascript, typescript, simple bus |

## Links

- npm: https://www.npmjs.com/package/curli-intl
- Repository: https://github.com/CarlosCraviotto/curli-intl
- Homepage: https://github.com/CarlosCraviotto/curli-intl#readme
- Issues: https://github.com/CarlosCraviotto/curli-intl/issues
- npm.io page: https://npm.io/package/curli-intl

## Dependencies (2)

- [curli-types](https://npm.io/package/curli-types.md) 0.0.1-beta.12
- [file-list-loader](https://npm.io/package/file-list-loader.md) 0.0.2-beta.0

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-05-05
- 0.0.1-beta.1 (beta) — 2020-05-05
- 0.0.1-beta.0 — 2020-05-05

## README

# curli-intl

[![Build Status](https://travis-ci.org/CarlosCraviotto/curli-intl.svg?branch=master)](https://travis-ci.com/github/CarlosCraviotto/curli-intl)
[![Coverage Status](https://coveralls.io/repos/github/CarlosCraviotto/curli-intl/badge.svg?branch=master&cach=ff)](https://coveralls.io/github/CarlosCraviotto/curli-intl?branch=master)

Typed internationalization (intl/i18n) library for TypeScript/JavaScript apps and Curli Framework.


### Installation

Install by `npm`

```sh
npm install --save curli-intl
```

#### Basic Usage

**1 - In the configurations file, declare  de followings properties:**

**@SUPPORT_LANGUAGES**: (Array<string>) A list with the supported languages.
**@DEFAULT_LANGUAGE** (string) The default language we will use if we aren't providing it in the get method.


**2 - Add the module definer:**

```typescript
import {TranslationsModuleDefiner} from "curli-intl";

  app.addModules(new TranslationsModuleDefiner(app));

```


**3 - Attach translation files paths to the service**

```typescript
public registerTranslations(translationsService: TranslationsService): void {
    translationsService.registerPath({path: 'languages/'});
}
```

**4 - Get the translation**

```typescript
const name = this.container.get('translations').get('name');
```



#### Commands

 - `npm run build`: Build the project (Translations).
 - `npm run build:clean`: Delete first the dist folder and build it.
 - `npm run clean`: Delete the dist folder.
 - `npm run test`: Execute the tests.
 - `npm run test:coverage`:  Execute the tests and calculate the coverage.
 - `npm run lint`: Check the code using the rules in .eslintre.js
 - `npm run lint:fix`: Check the code and try to fix it.



#### Contributing

When submitting your pull-request try to follow those guides:

- https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github
- https://medium.com/@vadimdemedes/making-your-first-contribution-de6576ddb190

  
#### License

MIT

---
_Source: https://npm.io/package/curli-intl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
