Skip to content

Commit

Permalink
[修复] 翻译问题
Browse files Browse the repository at this point in the history
  • Loading branch information
PJ-568 committed Apr 9, 2024
1 parent 1fd3f0b commit 86bba0f
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions js/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,27 @@ function loadingFade() {
// loadingPage.remove();
// $('#loading').remove();
position.style.display = 'none';
try{
translate.service.use('client.edge');
translate.listener.start();
translate.setAutoDiscriminateLocalLanguage();
translate.language.setUrlParamControl();
translate.ignore.class.push('notTranslate');
translate.nomenclature.append('chinese_simplified','english',`
刘甜=Liu Tian
主页=Home
友链=Links
`);
translate.execute();
}
catch(e){console.log('翻译系统出错:' + e);}
}

loadingBackground.style.opacity=opacity;
opacity-=0.4;
},100);
}
}
function initTranslate() {
try{
translate.service.use('client.edge');
translate.listener.start();
translate.setAutoDiscriminateLocalLanguage();
translate.language.setUrlParamControl();
translate.ignore.class.push('notTranslate');
translate.nomenclature.append('chinese_simplified','english',`
刘甜=Liu Tian
主页=Home
友链=Links
`);
translate.execute();
}
catch(e){console.log('翻译系统出错:' + e);}
}

window.addEventListener('load', initTranslate);

0 comments on commit 86bba0f

Please sign in to comment.