0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-16 00:15:08 +00:00
VueTube/NUXT/plugins/language.js

13 lines
292 B
JavaScript
Raw Normal View History

function module(text) {
const selectedLanguage = localStorage.getItem(text) || "english";
const languagePack = require('./languages/'+selectedLanguage);
if (!text) return languagePack;
return languagePack[text];
}
export default ({ app }, inject) => {
inject("lang", module);
};