Move references to languages and translated strings out of siteConfig.js into new translation.js module

This commit is contained in:
Frank Li 2017-07-11 17:03:27 -07:00
parent 48916d9f39
commit 099a13a264
9 changed files with 52 additions and 112 deletions

View file

@ -7,7 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
const siteConfig = require(process.cwd() + "/siteConfig.js");
const translation = require("./translation.js");
let language = "en";
@ -16,7 +16,7 @@ function setLanguage(lang) {
}
function translate(str) {
return siteConfig[language]["pages-strings"][str];
return translation[language]["pages-strings"][str];
}
module.exports = {