Internalization/Localization service. Filewatcher reloads the files automatically.
Payload:
{
"key": "YouLate",
"args": [
3
]
}Response:
{
"Lang": "de-DE",
"Result": "You are 3 minutea late."
}An example for the file:
Vars:
- Minutes:
# possible keys:
# one
# "=x" - where x is a number
# "<x"
# other
# format - to customize the format, which defaults to %d .
one: "minute"
other: "minutea"
format: "%d" # defaults to that.
- Dogs:
"=5": "dogsssss"
one: "dog"
other: "dogs"
- Houses:
one: "house"
other: "houses"
- Gender:
"=1": "She" # 1 for female
"=2": "He" # 2 for male
# Using variables in raw string
YouLate: "You are %[1]d ${Minutes} late."- APP_PORT: api port, default: 10001
- APP_LOCALESPATH: path to the locales files, default: ./locales An example for the locales directory structure:
- locales
-- de-DE
--- example.yml
-- en-US
--- example.yml