Skip to content

Commit

Permalink
Merge e493e4a into a74afa5
Browse files Browse the repository at this point in the history
  • Loading branch information
SBeator committed Jul 28, 2016
2 parents a74afa5 + e493e4a commit 3105cc5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module.exports = (function() {

// reset locales
locales = {};
i18n.locales = locales;

// Provide custom API method aliases if desired
// This needs to be processed before the first call to applyAPItoObject()
Expand Down
20 changes: 20 additions & 0 deletions test/i18n.locales.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var i18n = require('../i18n'),
should = require("should");

describe('Locales test', function () {

beforeEach(function () {

i18n.configure({
locales: ['en', 'de'],
directory: './locales',
register: global
});

});

it('locales will get all locales', function () {
i18n.locales['en']['Hello'].should.equal('Hello');
i18n.locales['de']['Hello'].should.equal('Hallo');
});
});

0 comments on commit 3105cc5

Please sign in to comment.