2.0.4 • Published 5 years ago

bedrock-i18n v2.0.4

Weekly downloads
35
License
-
Repository
github
Last release
5 years ago

bedrock-i18n

A bedrock module that adds minimal internationalization support to bedrock-express.

bedrock-i18n is built using i18n. When bedrock starts, (the bedrock.start event), it will scan all paths in bedrock.config.express.static looking for root directories that are named after ISO 639-1 codes. Each matching directory is cached to be used later for language-specific HTTP requests. Specifically, when an HTTP request is made with an Accept-Language header, if the matching language is in the cache and the requested URL matches a path in that directory, the language-specific file is returned in the response.

Requirements

  • npm v3+

Quick Examples

npm install bedrock-i18n
var bedrock = require('bedrock');

require('bedrock-server');
require('bedrock-express');
require('bedrock-i18n');

bedrock.start();

Configuration

For more documentation on configuration see config.js.

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago