adjustment
This commit is contained in:
@ -98,7 +98,7 @@ function applyLanguage(dom, result) {
|
||||
}
|
||||
}
|
||||
|
||||
async function init(dom = document.body, options = {}) {
|
||||
export async function init(dom = document.body, options = {}) {
|
||||
const lgid = getCurrentLgId();
|
||||
let lgres = localStorage.getItem(getStorageKey(lgid));
|
||||
let result;
|
||||
@ -139,14 +139,14 @@ async function init(dom = document.body, options = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
function r(key, defaultValue) {
|
||||
export function r(key, defaultValue) {
|
||||
if (cache != null) {
|
||||
return getLanguage(cache, key, defaultValue);
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
const lang = {
|
||||
export const lang = {
|
||||
get current() {
|
||||
return getCurrentLgId();
|
||||
},
|
||||
@ -156,10 +156,4 @@ const lang = {
|
||||
get savedSuccessfully() {
|
||||
return r('savedSuccessfully', 'Saved successfully.');
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
init,
|
||||
r,
|
||||
lang
|
||||
}
|
Reference in New Issue
Block a user