# banana-i18n-loader

> webpack loader for banana i18n messages

Latest version **0.1.0** (published 2019-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install banana-i18n-loader
pnpm add banana-i18n-loader
yarn add banana-i18n-loader
bun add banana-i18n-loader
```

## 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.1.0 |
| Published | 2019-11-08 |
| First published | 2019-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Santhosh Thottingal |
| Maintainers | santhosh.thottingal |
| Keywords | webpack, webpack-loader, i18n, internationalization, i10n, localization |

## Links

- npm: https://www.npmjs.com/package/banana-i18n-loader
- Repository: https://github.com/santhoshtr/banana-i18n-loader
- Homepage: https://github.com/santhoshtr/banana-i18n-loader#readme
- Issues: https://github.com/santhoshtr/banana-i18n-loader/issues
- npm.io page: https://npm.io/package/banana-i18n-loader

## Dependencies (2)

- [banana-i18n](https://npm.io/package/banana-i18n.md) ^1.1.2
- [loader-utils](https://npm.io/package/loader-utils.md) ^1.1.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.1.0 (latest) — 2019-11-08
- 0.0.1-security — 2019-11-08

## README

[![npm][npm]][npm-url]

# banana-i18n-loader

A webpack loader for [banana-i18n](https://github.com/wikimedia/banana-i18n) message files.

This loader resolves the fallback messages when certain messages are not localized yet. For example, in `fr` locale suppose only 5 messages are localized while the source locale `en` has 10 messages. The fr.json provided by this loader will have 10 messages and 5 messages that are not localized will be taken from en.json

The locale fallback is based on banana-i18n fallback chain logic.

## Getting Started

To begin, you'll need to install `banana-i18n-loader`:

```console
$ npm install banana-i18n-loader --save-dev
```

**index.js**

```js
import fr from '@/i18n/fr.json';
```

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.json$/,
        include: [path.resolve(__dirname, "i18n")],
        use: [
          {
            loader: 'banana-i18n-loader',
          },
        ],
      },
    ],
  },
};
```

And run `webpack` via your preferred method.

## License

[MIT](./LICENSE)

[npm]: https://img.shields.io/npm/v/banana-i18n-loader.svg
[npm-url]: https://npmjs.com/package/banana-i18n-loader

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