Created
September 21, 2018 09:48
-
-
Save LasseRafn/e49c32d75a78634e3b42b7df30ccbc2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const languages = [ | |
"en", "da", | |
]; | |
const files = [ | |
"products", "dates", "validation", | |
]; | |
let output = {}; | |
for (let language in languages) { | |
for (let file in files) { | |
try { | |
output[languages[language] + "." + files[file]] = require("../../lang/" + languages[language] + "/" + files[file] + ".php"); | |
} catch (ex) { | |
// ignore.. do not require | |
} | |
} | |
} | |
export default output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment