apeman-app-locale
apeman app for locale data.
Add dynamic locale with apemanlocale for requested lang.
Installation
$ npm install apeman-app-locale --save
Usage
- Define an app within Apemanfile.js
- Call the app via apeman app command.
Apemanfile.js
/** This is an example Apemanfile to use apeman-app-locale */ 'use strict' const loc = // Apemanlocale instance. moduleexports = $pkg: /* ... */ $apps: // Define your own app. 'my-app-01': // Map url and handlers. '/': loc {} { let title = req // Get locale message for requested lang. console /* ... */ }
Then,
$ apeman app my-app-01 -p 3000
Signature
apemanAppLocale(loc, options) -> function
apeman app for locale data.
Args
Name | Type | Default | Description |
---|---|---|---|
loc | Object | Apemanlocale instance. | |
options | Object | Optional settings. | |
options.name | string | locale | Name of property for request. |
License
This software is released under the MIT License.