This package has been deprecated

Author message:

Merged to alp-node

alp-node-language
TypeScript icon, indicating that this package has built-in type declarations

7.1.1 • Public • Published

alp-node-language

language context in alp framework

Config file

common:
  availableLanguages: [en, fr]

With koa

import App from 'koa';
import config from 'alp-node-config';
import language from 'alp-node-language';

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

context

language: string

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

firstAcceptedLanguage: string

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

/alp-node-language/

    Package Sidebar

    Install

    npm i alp-node-language

    Weekly Downloads

    88

    Version

    7.1.1

    License

    ISC

    Unpacked Size

    22.2 kB

    Total Files

    10

    Last publish

    Collaborators

    • churpeau