Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@narando/languages

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@narando/languages - npm Package Compare versions

Comparing version 0.22.0 to 0.22.1

dist/locales/de-DE.json

8

dist/utils/index.js

@@ -12,5 +12,13 @@ "use strict";

});
Object.defineProperty(exports, "translateLanguages", {
enumerable: true,
get: function () {
return _translateLanguages.default;
}
});
var _getLanguagesWithSelection = _interopRequireDefault(require("./getLanguagesWithSelection"));
var _translateLanguages = _interopRequireDefault(require("./translateLanguages"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

13

package.json
{
"name": "@narando/languages",
"version": "0.22.0",
"version": "0.22.1",
"description": "",

@@ -12,3 +12,4 @@ "main": "dist/index.js",

"prepare": "npm run build",
"test": "jest"
"test": "jest",
"lint-i18n": "lint-i18n --dir ./src/locales"
},

@@ -33,5 +34,9 @@ "repository": {

"@babel/core": "^7.2.2",
"@babel/node": "^7.2.2"
"@babel/node": "^7.2.2",
"@narando/lint-i18n": "^0.22.1"
},
"gitHead": "9c8b4f37690914ab272b6fe20cc7efa268186bb1"
"dependencies": {
"@narando/express-i18n-middleware": "^0.22.1"
},
"gitHead": "bc912950fb8f7d7b72021db395131f47911a0456"
}

@@ -54,1 +54,32 @@ # @narando/languages

```
## Utils
Some more useful functions
### Language with select flag
In case you are trying to fill a selectpicker or something comparable.
It could be usefull to get the language object with a selected flag.
```javascript
import { Utils } from "@narnado/languages";
res.locals.languages = Utils.getLanguagesWithSelection("es-419");
// The function returns a list with all languages.
// es-419 is the only language with a selected=true
```
### Get the languages translated
In case you want to get the language object but want to get the translated language names.
The languages are available in English (US) und German (Germany). More languages will be added in the future.
```javascript
import { Utils } from "@narnado/languages";
res.locals.languages = Utils.translateLanguages("de-DE");
// example: de-DE is now Deutsch (Deutschland)
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc