Added the brazilian language

This commit is contained in:
welton da silva castro
2021-10-26 22:59:03 -03:00
parent 925ad90f91
commit ad92eda699
2 changed files with 273 additions and 2 deletions

View File

@@ -1,4 +1,3 @@
const Cache = ('./cache');
const messages = require('../i18n/messages.json');
/**
@@ -7,7 +6,7 @@ const messages = require('../i18n/messages.json');
* @param {Object} [data]
*/
module.exports = function (namespace, key, data) {
let locale = Cache.locale;
let locale = navigator.language; //get location by navigator
// check that the locale exists
if (typeof messages[locale] === 'undefined') {
locale = 'en';