Enabling Galego in interface

This commit is contained in:
Vicente J. Ruiz Jurado 2018-08-16 17:32:45 +02:00
parent 6f683ebaa2
commit f608fc4d28

View file

@ -3,6 +3,8 @@ import moment from 'moment';
// Load the js langs // Load the js langs
import es from 'meteor-accounts-t9n/build/es'; import es from 'meteor-accounts-t9n/build/es';
import en from 'meteor-accounts-t9n/build/en'; import en from 'meteor-accounts-t9n/build/en';
// TODO
import gl from 'meteor-accounts-t9n/build/gl';
const backOpts = { const backOpts = {
// path where resources get loaded from // path where resources get loaded from
@ -21,7 +23,10 @@ const shouldDebug = (forceDebug && !Meteor.isProduction);
const i18nOpts = { const i18nOpts = {
backend: backOpts, backend: backOpts,
// lng: 'es', // lng: 'es',
fallbackLng: ['es', 'en'], fallbackLng: {
gl: ['es'],
default: ['en']
},
sendMissingTo: 'fallback', sendMissingTo: 'fallback',
interpolation: { interpolation: {
escapeValue: false, // not needed for react!! escapeValue: false, // not needed for react!!
@ -35,7 +40,7 @@ const i18nOpts = {
return value; return value;
} }
}, },
whitelist: ['es', 'en'], // allowed languages whitelist: ['es', 'en', 'gl'], // allowed languages
load: 'languageOnly', // 'es' o 'en', previously: 'all', // es-ES -> es, en-US -> en load: 'languageOnly', // 'es' o 'en', previously: 'all', // es-ES -> es, en-US -> en
debug: shouldDebug, debug: shouldDebug,
ns: 'common', ns: 'common',