# apemanlocale

> Message resource for apeman project.

Latest version **6.0.2** (published 2017-02-05) · MIT license · 0 weekly downloads

## Install

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

## 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 | 6.0.2 |
| Published | 2017-02-05 |
| First published | 2015-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 11 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | apeman, locales |

## Links

- npm: https://www.npmjs.com/package/apemanlocale
- Repository: https://github.com/apeman-labo/apemanlocale
- Homepage: https://github.com/apeman-labo/apemanlocale#readme
- Issues: https://github.com/apeman-labo/apemanlocale/issues
- npm.io page: https://npm.io/package/apemanlocale

## Dependencies (11)

- [extend](https://npm.io/package/extend.md) ^3.0.0
- [locale](https://npm.io/package/locale.md) ^0.1.0
- [fmtjson](https://npm.io/package/fmtjson.md) ^3.0.6
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.7.0
- [objnest](https://npm.io/package/objnest.md) ^3.0.9
- [evaljson](https://npm.io/package/evaljson.md) ^4.1.0
- [filecopy](https://npm.io/package/filecopy.md) ^3.0.0
- [colorprint](https://npm.io/package/colorprint.md) ^4.0.11
- [inflection](https://npm.io/package/inflection.md) ^1.12.0
- [stringcase](https://npm.io/package/stringcase.md) ^3.2.1
- [arrayfilter](https://npm.io/package/arrayfilter.md) ^1.1.2

## 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

- 6.0.2 (latest) — 2017-02-05
- 6.0.1 — 2017-02-05
- 5.1.6 — 2016-11-29
- 5.1.5 — 2016-10-29
- 5.1.4 — 2016-10-20
- 5.1.3 — 2016-10-16
- 5.1.2 — 2016-10-16
- 5.1.1 — 2016-10-07
- 5.1.0 — 2016-10-07
- 5.0.21 — 2016-08-15
- 5.0.20 — 2016-08-15
- 5.0.19 — 2016-08-08
- 5.0.18 — 2016-08-08
- 5.0.17 — 2016-08-07
- 5.0.16 — 2016-08-07
- … 75 more at https://npm.io/package/apemanlocale/versions

## README

apemanlocale
==========

<!---
This file is generated by ape-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/apeman-labo/apemanlocale
[bd_travis_url]: http://travis-ci.org/apeman-labo/apemanlocale
[bd_travis_shield_url]: http://img.shields.io/travis/apeman-labo/apemanlocale.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/apeman-labo/apemanlocale
[bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-labo/apemanlocale.svg?token=
[bd_license_url]: https://github.com/apeman-labo/apemanlocale/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/apeman-labo/apemanlocale
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-labo/apemanlocale.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-labo/apemanlocale.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/apeman-labo/apemanlocale
[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-labo/apemanlocale.svg
[bd_npm_url]: http://www.npmjs.org/package/apemanlocale
[bd_npm_shield_url]: http://img.shields.io/npm/v/apemanlocale.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Message resource for apeman project.

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install apemanlocale --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

Create a directory with name "loc" and put locale files like "en.json" there.


**loc/en.json**
```json
{
  "keys": {
    "APP_NAME": "hello-world"
  },
  "titles": {
    "WELCOME_TITLE": "Welcome to #{keys.APP_NAME}!"
  }
}
```

**loc/index.js**

```javascript
'use strict'

const apemanlocale = require('apemanlocale')

// Exports locales as module.
let locales = apemanlocale(__dirname, {
  // Options
})

// Print all locales
locales.print()

module.exports = locales

```


Then,

```javascript
'use strict'

// Require defined locales
const loc = require('./loc/index.js')

let en = loc('en')
console.log(en.titles.WELCOME_TITLE) // -> "Welcome to hello-world!"

```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/03.Signature.md.hbs" Start -->

<a name="section-doc-guides-03-signature-md"></a>

Signature
-------

#### apemanlocale(dirname, options) -> object

Define locale message resource.

##### Args

| Name | Type | Default | Description |
| --- | ---- | --- | --- |
| dirname | string  | locales | Directory path which contains locale messages. |
| options | object  |  | Optional settings. |
| options.default | object  | en | Default lang. |
| options.fallback | boolean  |  | Use default lang as fallback |
| options.buildin | boolean  |  | Use buildin langs |


<!-- Section from "doc/guides/03.Signature.md.hbs" End -->

<!-- Section from "doc/guides/04.Build in.md.hbs" Start -->

<a name="section-doc-guides-04-build-in-md"></a>

Build-in messages
----------------

### 
| Key | Message |
| --- | -------  |
| errors.RESOURCE_DATA_CONFLICT_ERROR | RESOURCE_DATA_CONFLICT_ERROR<br/>リソースデータ競合エラー |
| errors.RESOURCE_DATA_ERROR | RESOURCE_DATA_ERROR<br/>リソースデータエラー |
| errors.RESOURCE_DATA_MISSING_ERROR | RESOURCE_DATA_MISSING_ERROR<br/>リソースデータ欠落エラー |
| errors.RESOURCE_ERROR | RESOURCE_ERROR<br/>リソースエラー |
| errors.RESOURCE_INCLUDE_ERROR | RESOURCE_INCLUDE_ERROR<br/>リソースインクルードエラー |
| errors.RESOURCE_INCLUDE_INVALID_ERROR | RESOURCE_INCLUDE_INVALID_ERROR<br/>RESOURCE_INCLUDE_INVALID_ERROR |
| errors.RESOURCE_NOT_FOUND_ERROR | RESOURCE_NOT_FOUND_ERROR<br/>未検出エラー |
| errors.RESOURCE_TYPE_ERROR | RESOURCE_TYPE_ERROR<br/>リソース種別エラー |
| errors.RESOURCE_TYPE_INVALID_ERROR | RESOURCE_TYPE_INVALID_ERROR<br/>リソース種別不正エラー |
| errors.RESOURCE_TYPE_MISSING_ERROR | RESOURCE_TYPE_MISSING_ERROR<br/>リソース種別欠落エラー |
| errors.RESOURCE_VR_ERROR | RESOURCE_VR_ERROR<br/>リソースバージョンエラー |
| errors.RESOURCE_VR_TYPE_ERROR | RESOURCE_VR_TYPE_ERROR<br/>リソースバージョン種別エラー |
| errors.SIGN_CAPTCHA_WRONG_ERROR | SIGN_CAPTCHA_WRONG_ERROR<br/>CAPTCHA照合エラー |
| errors.SIGN_ERROR | SIGN_ERROR<br/>ログインエラー |
| errors.SIGN_FORM_WRONG_ERROR | SIGN_FORM_WRONG_ERROR<br/>ログイン入力内容エラー |
| errors.SOMETHING_WRONG_ERROR | SOMETHING_WRONG_ERROR<br/>不明なエラー |
| errors.VALUE_DUPLICATE_ERROR | VALUE_DUPLICATE_ERROR<br/>文字列重複エラー |
| errors.VALUE_ERROR | VALUE_ERROR<br/>値エラー |
| errors.VALUE_INVALID_ERROR | VALUE_INVALID_ERROR<br/>値不正エラー |
| errors.VALUE_MISSING_ERROR | VALUE_MISSING_ERROR<br/>値欠落エラー |
| errors.VALUE_NUMBER_ERROR | VALUE_NUMBER_ERROR<br/>数値エラー |
| errors.VALUE_NUMBER_INVALID_ERROR | VALUE_NUMBER_INVALID_ERROR<br/>数値不正エラー |
| errors.VALUE_NUMBER_TOO_LARGE_ERROR | VALUE_NUMBER_TOO_LARGE_ERROR<br/>数値上限エラー |
| errors.VALUE_NUMBER_TOO_SMALL_ERROR | VALUE_NUMBER_TOO_SMALL_ERROR<br/>数値下限エラー |
| errors.VALUE_STRING_ERROR | VALUE_STRING_ERROR<br/>文字列エラー |
| errors.VALUE_STRING_INVALID_ERROR | VALUE_STRING_INVALID_ERROR<br/>文字列不正エラー |
| errors.VALUE_STRING_TOO_LONG_ERROR | VALUE_STRING_TOO_LONG_ERROR<br/>文字列長上限エラー |
| errors.VALUE_STRING_TOO_SHORT_ERROR | VALUE_STRING_TOO_SHORT_ERROR<br/>文字列長下限エラー |
| errors.VALUE_TYPE_ERROR | VALUE_TYPE_ERROR<br/>値種別エラー |
| errors.VALUE_TYPE_INVALID_ERROR | VALUE_TYPE_INVALID_ERROR<br/>値種別不正エラー |
| status.400 | Bad Request<br/>不正なリクエスト |
| status.401 | Authentication is required<br/>認証が必要です |
| status.403 | You don't have permissions<br/>権限がありません |
| status.404 | Could not find resource<br/>リソースが見つかりません |
| status.500 | Something wrong with the server<br/>サーバーでエラーが発生しました |
| status.502 | Bad gateway error<br/>ゲートウェイエラー |
| status.503 | Server not available<br/>混雑中 |


<!-- Section from "doc/guides/04.Build in.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/apeman-labo/apemanlocale/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [apeman][apeman_url]

[apeman_url]: https://www.npmjs.com/package/apeman

<!-- Links End -->

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