Skip to content

accreditrust/bedrock-i18n

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Bedrock internationalization module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%