Ghost/ghost/i18n/test/i18n.test.js
Daniel Lockyer 0d9268ad86 Added i18n package
refs https://github.com/TryGhost/Ghost/issues/15502

- this is an early implementation of an i18n provider by
  exporting an instance of `i18next`
- there's a lot more to be done here but baby steps :)
2023-01-18 13:54:14 +01:00

30 lines
592 B
JavaScript

const assert = require('assert');
const i18n = require('../');
describe('Can translate', function () {
describe('Dutch', function () {
let t;
before(function () {
t = i18n('nl').t;
});
it('can translate Dutch', function () {
assert.equal(t('Hello'), 'Hallo');
});
});
describe('English', function () {
let t;
before(function () {
t = i18n('en').t;
});
it('can translate English', function () {
assert.equal(t('Hello'), 'Hello');
});
});
});