Update i18n config

This commit is contained in:
Kim Gardner
2017-08-01 12:55:05 -04:00
parent fdda5e5bef
commit d300025c00
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -8,11 +8,12 @@ import frTA from '../../../node_modules/timeago.js/locales/fr';
import en from '../../../locales/en.yml';
import es from '../../../locales/es.yml';
import fr from '../../../locales/fr.yml';
import pr from '../../../locales/pr.yml';
// Translations are happening at https://translate.lingohub.com/the-coral-project/dashboard
const defaultLanguage = 'en';
const translations = {...en, ...es, ...fr};
const translations = {...en, ...es, ...fr, ...pr};
let lang;
let timeagoInstance;
+3 -2
View File
@@ -6,15 +6,16 @@ const yaml = require('yamljs');
const es = yaml.load('./locales/es.yml');
const en = yaml.load('./locales/en.yml');
const fr = yaml.load('./locales/fr.yml');
const pr = yaml.load('./locales/pr.yml');
const accepts = require('accepts');
// default language
let defaultLanguage = 'en';
let language = defaultLanguage;
const languages = ['en', 'es', 'fr'];
const languages = ['en', 'es', 'fr', 'pr'];
const translations = Object.assign(en, es, fr);
const translations = Object.assign(en, es, fr, pr);
/**
* Exposes a service object to allow translations.