0.0.9 • Published 9 years ago
gengojs-default-api v0.0.9
gengojs-default-api
The default API plugin for gengo.js.
This module will be used for gengo.js.
Note: The API examples defined are respect to the default parser.
Documentation
See documentation
An example usage with options is:
var gengo = require('gengojs');
var api = require('gengojs-default-api');
/* In whatever framework you are using: */
// I'll use express for an example
// but it shouldn't matter
var app = require('express')();
app.use(gengo({
// Specify the type
// of option to modify
api:{
/* options */
}
},/*api()*/));
Internal API
Not Applicable
Dependencies
this.header.getLocale(locale:String)
fromHeader
* Should return a string of the current locale.this.header.setLocale(locale:String)
fromHeader
* Should set the locale.this.header.detectLocale(locale:String)
fromHeader
(optional) * Should detect the current locale by parsing the Accept-Language, domains, sub-domains, queries, URLs, and cookies.this.header.options.supported:Array
fromHeader
options * Should be an array of supported locales.this.backend.catalog(locale:String)
fromBackend
* Should return an object containing the dictionaries for each locale.
Options
{
"global":"__",
"localize":"__l"
}
Debug
Unix:
DEBUG=gengo.api
Windows:
SET DEBUG=gengo.api
See gengojs-debug for usage.
Contribute
Feel free to contribute or even fork the project. This plugin has been
written in ES6 and can be seen under lib/index.js
.
0.0.9
9 years ago
0.0.8
9 years ago
0.0.7
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago
0.0.1-beta.10
9 years ago
0.0.1-beta.9
9 years ago
0.0.1-beta.8
9 years ago
0.0.1-beta.7
9 years ago
0.0.1-beta.6
9 years ago
0.0.1-beta.5
9 years ago
0.0.1-beta.4
9 years ago
0.0.1-beta.3
9 years ago
0.0.1-beta.2
9 years ago
0.0.1-beta.1
9 years ago