Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
> **Note**
> This project has been deprecated and will not be receiving any updates anymore.
> Please, consider using an alternative package.

# express-simple-locale

A simple Express middleware to guess the **short-locale** of a user. It then saves the found locale on the request for further usage.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "express-simple-locale",
"description": "A simple Express middleware to guess the short-locale of a user.",
"version": "0.3.4",
"version": "1.0.0",
"author": {
"name": "Hugo Giraudel",
"email": "hugo.giraudel@n26.com",
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ var get = require('lodash.get')
var getLocale = require('./helpers/getLocale')

function middleware (options) {
console.warn(
'express-simple-locale has been deprecated and will not be receiving any updates anymore.'
+ '\nPlease, consider using an alternative package.'
)

var key = get(options, 'key', 'locale')

return function (request, response, next) {
Expand Down