mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-26 21:23:02 +00:00
13 lines
292 B
JavaScript
13 lines
292 B
JavaScript
|
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);
|
||
|
};
|