Skip to content

AgentNemo00/sca-i8n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I18n

Internalization/Localization service. Filewatcher reloads the files automatically.

Endpoint

Payload:

{
  "key": "YouLate",
  "args": [
    3
  ]
}

Response:

{
  "Lang": "de-DE",
  "Result": "You are 3 minutea late."
}

Files

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."

Environment variable

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages