🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

alp-language

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alp-language

language context in alp framework

latest
Source
npmnpm
Version
1.9.1
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

alp-language

language context in alp framework

Config file

common:
    availableLanguages: [en, fr]

With Koa

import Koa from 'koa';
import config from 'alp-config';
import language from 'alp-language';

const app = new Koa();
config(__dirname + '/config')(app);
language(app);

With Ibex (Browser)

import Ibex from 'ibex';
import config from 'alp-config';
import language from 'alp-language';

const app = new Ibex();
config('/config')(app);
language(app);

context

language: string

First accepted language in the header / in navigator.languages contained in availableLanguages, or the first language in availableLanguages.

firstAcceptedLanguage: string

The first accepted language in the header / in navigator.languages regardless of availableLanguages. Can be a locale. Usefull for date/time/...

Keywords

alp

FAQs

Package last updated on 25 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts