# baslocalize

> Module for localize content in AngularJS project.

Latest version **1.0.13** (published 2018-06-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install baslocalize
pnpm add baslocalize
yarn add baslocalize
bun add baslocalize
```

## 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.0.13 |
| Published | 2018-06-20 |
| First published | 2018-06-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexander Beichuk |
| Maintainers | alexanderbeichuk |
| Keywords | localize, AngularJS, Mifort |

## Links

- npm: https://www.npmjs.com/package/baslocalize
- npm.io page: https://npm.io/package/baslocalize

## Recent versions

- 1.0.13 (latest) — 2018-06-20
- 1.0.12 — 2018-06-20
- 1.0.11 — 2018-06-14
- 1.0.10 — 2018-06-13
- 1.0.9 — 2018-06-04
- 1.0.8 — 2018-06-04
- 1.0.7 — 2018-06-04
- 1.0.6 — 2018-06-04
- 1.0.5 — 2018-06-04
- 1.0.4 — 2018-06-04
- 1.0.3 — 2018-06-04
- 1.0.2 — 2018-06-04
- 1.0.1 — 2018-06-04
- 1.0.0 — 2018-06-04

## README

How use:
Include this module in your application module:
```js
var app = angular.module('appModule', [
    'basLocalize'
]);
```
For get current language:
```js
var language = localStorage.getItem("language");
```

We have variable for each languages with content:
```js
window.translations.cn = {
    "eth": {
        "collected": "筹募的ETH "
    }
};
```

For set default language:
```js
basLocalizeService.setDefaultLanguage(defaultLanguage);
```

Use your variable in:
```js
basLocalizeService.changeLanguage(currentLanguage);
```
in controller for change language:
```js
app.controller('homeController', [ '$scope', 'basLocalizeService', function ($scope, basLocalizeService) {
    $scope.changeLanguage = function(currentLanguage) {  //currentLanguage = cn
        basLocalizeService.changeLanguage(currentLanguage, defaultLanguage);
            };
    }])
```


Use in file.html:
```html
<span ng-localize="eth.collected">template text</span>
```

GOOD LUCK!

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