# @andrewwormald/i18n-extended

> ![logo](https://raw.githubusercontent.com/SwiftySpartan/i18n-extended/master/angular.png)

Latest version **1.4.2** (published 2019-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @andrewwormald/i18n-extended
pnpm add @andrewwormald/i18n-extended
yarn add @andrewwormald/i18n-extended
bun add @andrewwormald/i18n-extended
```

Provides the command `i18n-extended`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.2 |
| Published | 2019-08-05 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 398.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrew Wormald |
| Maintainers | andrewwormald |
| Keywords | i18n-extended, angular translations, ng, translate, angular, i18n, ts, i18n ts, Angular, cli, translations, angular translations |

## Links

- npm: https://www.npmjs.com/package/@andrewwormald/i18n-extended
- Repository: https://github.com/SwiftySpartan/i18n-extended
- Homepage: https://github.com/SwiftySpartan/i18n-extended#readme
- Issues: https://github.com/SwiftySpartan/i18n-extended/issues
- npm.io page: https://npm.io/package/@andrewwormald/i18n-extended

## Dependencies (13)

- [rxjs](https://npm.io/package/rxjs.md) 6.0.0
- [kleur](https://npm.io/package/kleur.md) ^3.0.3
- [listr](https://npm.io/package/listr.md) ^0.14.3
- [stream](https://npm.io/package/stream.md) 0.0.2
- [timers](https://npm.io/package/timers.md) ^0.1.1
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.19
- [prompts](https://npm.io/package/prompts.md) ^2.1.0
- [zone.js](https://npm.io/package/zone.js.md) ^0.8.26
- [enquirer](https://npm.io/package/enquirer.md) ^2.3.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.0.1
- [node-cmd](https://npm.io/package/node-cmd.md) ^3.0.0
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.8
- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.2.2

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 1.4.2 (latest) — 2019-08-05
- 1.4.0-beta.7 (beta) — 2019-07-18
- 1.4.1 — 2019-08-02
- 1.4.0 — 2019-07-18
- 1.4.0-beta.6 — 2019-07-18
- 1.4.0-beta.5 — 2019-07-18
- 1.4.0-beta.4 — 2019-07-18
- 1.4.0-beta.3 — 2019-07-18
- 1.4.0-beta.2 — 2019-07-18
- 1.4.0-beta.1 — 2019-07-18
- 1.4.0-beta.0 — 2019-07-18
- 1.3.7 — 2019-07-15
- 1.3.7-beta.3 — 2019-07-15
- 1.3.6 — 2019-07-12
- 1.3.5 — 2019-06-03
- … 11 more at https://npm.io/package/@andrewwormald/i18n-extended/versions

## README

#### Completing everything that is missing in Angular's i18n package
![logo](https://raw.githubusercontent.com/SwiftySpartan/i18n-extended/master/angular.png)

___________
# i18n-extended [![NPM version](https://img.shields.io/npm/v/@andrewwormald/i18n-extended.svg?style=flat)](https://www.npmjs.com/package/@andrewwormald/i18n-extended) [![NPM monthly downloads](https://img.shields.io/npm/dm/@andrewwormald/i18n-extended.svg?style=flat)](https://npmjs.org/package/@andrewwormald/i18n-extended) [![NPM total downloads](https://img.shields.io/npm/dt/@andrewwormald/i18n-extended.svg?style=flat)](https://npmjs.org/package/@andrewwormald/i18n-extended)
##### created by  Andrew Wormald
###### SwiftySpartan / @andrewwormald
#
####Notes
<p> Production ready from v1.3.5</p>
<p> You must install this gloablly to easily execute
 the command from anywhere without having to use
 `./node_modules/.bin/i18n-extended` executable </p>

### Installation:
##### Step 1:
<p> Navigate to your angular directory that has all your angular projects.</p>

```bash
    npm install -g @andrewwormald/i18n-extended@latest --save
```

##### Step 2:
<p>You need to run the command in your angular project directory</p>

```bash
    i18n-extended 
```

<p>If the above doesnt work try the following in your Angular app directory</p>

```bash
    ./node_modules/.bin/i18n-extended 
```

##### Step 3:

<p>Configure i18n-extended service in your app.module.ts file</p>

```typescript jsx
    import { i18nExtended, I18N_EXTENDED_DATA } from '@andrewwormald/i18n-extended';
    
    // This file is generated at the root of the app
    import { i18nDataMap } from '../../../../i18n.extended.map';
    
    providers: [
        {
          provide: I18N_EXTENDED_DATA,
          useValue: () => i18nDataMap(),
        },
    ]
```

##### Step 4:
```typescript
    import { i18nExtended } from '@andrewwormald/i18n-extended';

   class myComponent {
        title: string;
        
        constructor(private translateService: i18nExtended) {
            // This needs to match the <target-language> attribute value in the .xlf file>
            this.translateService.setLanguage('fr');
        }
        
        myMethod() {
            // Calling `translateText()` will be part of marking the text for extraction
            // as well as fetching the translated text at runtime. If nothing is found or if
            // the text has not yet been translated, the provided text will be returned as is.  
            this.title = this.translateService.translateText('I like i18n-extended!');
        }
   }
```

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