'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getInterfaceLanguage = getInterfaceLanguage;
exports.validateTranslationKeys = validateTranslationKeys;
function getInterfaceLanguage() {
  if (!!navigator && !!navigator.language) {
    return navigator.language;
  } else if (!!navigator && !!navigator.languages && !!navigator.languages[0]) {
    return navigator.languages[0];
  } else if (!!navigator && !!navigator.userLanguage) {
    return navigator.userLanguage;
  } else if (!!navigator && !!navigator.browserLanguage) {
    return navigator.browserLanguage;
  }
  return 'en-US';
}

function validateTranslationKeys(translationKeys) {
  var reservedNames = ['_interfaceLanguage', '_language', '_defaultLanguage', '_defaultLanguageFirstLevelKeys', '_props'];
  translationKeys.forEach(function (key) {
    if (reservedNames.indexOf(key) !== -1) {
      throw new Error(key + ' cannot be used as a key. It is a reserved word.');
    }
  });
}
@@ -219,16 +219,156 @@
 age() %7B%0A
+  var defaultLang = 'en-US';%0A%0A  // Check if it's running on server side%0A  if (typeof window === 'undefined') %7B%0A    return defaultLang;%0A  %7D%0A%0A
   if (!!
@@ -752,23 +752,27 @@
  return 
-'en-US'
+defaultLang
 ;%0A%7D%0A%0Afun

Fix server side. Build to lib