This package is a wrapper around the NStack.io API
Supports the following features:
- Translate
Create config nstack.json
{
"log": false,
"defaultApplication": "appOne",
"translate": {
"defaultPlatform": "backend",
"defaultLanguage": "en-UK",
"cacheInMinutes": 60
},
"applications": [
{
"name": "appOne",
"applicationId": "secret",
"restKey": "secret",
"masterKey": "secret"
}
]
}
import NStack
And add provider
try drop.addProvider(NStackProvider(drop: drop))
Consider making a easy accessible var
let translate = drop.nstack?.application.translate.self
// With shortcut
translate?.get(section: "default", key: "ok")
// Through drop
drop.nstack?.application.translate.get(platform: "backend", language: "en-UK", section: "default", key: "saveSuccess", replace: ["model": "test"])
This package is developed and maintained by the Vapor team at Nodes.
This package is open-sourced software licensed under the MIT license