# fluxible-plugin-locale-counterpart

> counterpart locale setting plugin for fluxible

Latest version **0.0.3** (published 2015-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install fluxible-plugin-locale-counterpart
pnpm add fluxible-plugin-locale-counterpart
yarn add fluxible-plugin-locale-counterpart
bun add fluxible-plugin-locale-counterpart
```

## 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.3 |
| Published | 2015-02-15 |
| First published | 2015-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Valeriy Yatsko |
| Maintainers | dwr |
| Keywords | yahoo, flux, react, fluxible |

## Links

- npm: https://www.npmjs.com/package/fluxible-plugin-locale-counterpart
- Repository: https://github.com/dwr/fluxible-plugin-locale-counterpart
- Issues: https://github.com/dwr/fluxible-plugin-locale-counterpart/issues
- npm.io page: https://npm.io/package/fluxible-plugin-locale-counterpart

## Dependencies (1)

- [counterpart](https://npm.io/package/counterpart.md) ^0.16.4

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2015-02-15
- 0.0.2 — 2015-02-15
- 0.0.1 — 2015-02-15

## README

# fluxible-plugin-locale-counterpart

Counterpart locale setting plugin for fluxible.

Use for building beautiful isomorphic app translations.

## Installation

```sh
npm install fluxible-plugin-locale-counterpart --save
```

## Usage

You need to set `locale` cookie yourself or using LocaleSwitcher code below.

```js
import localePlugin from "fluxible-plugin-locale-counterpart";

app.plug(localePlugin);
```

I use [react-translate-component](https://github.com/martinandert/react-translate-component) in my application.

Here's how LocaleSwitcher looks like:

```js
import React from "react";
import counterpart from "counterpart";
import {Input} from "react-bootstrap";
import Cookies from "cookies-js";

let LocaleSwitcher = React.createClass({
  handleChange: function(e) {
    counterpart.setLocale(e.target.value);
    Cookies.set('locale', e.target.value);
  },

  render: function() {
    return (
      <Input
        type="select"
        className="input-sm"
        groupClassName="form-inline form-menu-inline"
        defaultValue={counterpart.getLocale()}
        onChange={this.handleChange}
        >
        <option value="en">English</option>
        <option value="ru">Русский</option>
      </Input>
    );
  }
});

export default LocaleSwitcher;
```

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