mirror of
https://github.com/drakkan/sftpgo.git
synced 2026-03-14 14:25:52 +01:00
Lab: Vietnamese translation and hard-code for lab on Vietnamese language
This commit is contained in:
parent
3cae004e6b
commit
05b89a9e86
2 changed files with 1158 additions and 13 deletions
1139
static/locales/vi/translation.json
Normal file
1139
static/locales/vi/translation.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -174,19 +174,24 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||
|
||||
const lngs = {};
|
||||
//{{- range .Languages}}
|
||||
//{{- if eq . "en"}}
|
||||
lngs.en = { nativeName: 'English' };
|
||||
//{{- else if eq . "it" }}
|
||||
lngs.it = { nativeName: 'Italiano' };
|
||||
//{{- else if eq . "de" }}
|
||||
lngs.de = { nativeName: 'Deutsch' };
|
||||
//{{- else if eq . "fr" }}
|
||||
lngs.fr = { nativeName: 'Français' };
|
||||
//{{- if eq . "vi"}}
|
||||
// lngs.vi = { nativeName: 'Vietnamese' };
|
||||
//{{- else if eq . "en" }}
|
||||
// lngs.en = { nativeName: 'English' };
|
||||
// //{{- else if eq . "it" }}
|
||||
// lngs.it = { nativeName: 'Italiano' };
|
||||
// //{{- else if eq . "de" }}
|
||||
// lngs.de = { nativeName: 'Deutsch' };
|
||||
// //{{- else if eq . "fr" }}
|
||||
// lngs.fr = { nativeName: 'Français' };
|
||||
//{{- end}}
|
||||
//{{- end}}
|
||||
if (Object.keys(lngs).length == 0){
|
||||
lngs.en = { nativeName: 'English' };
|
||||
}
|
||||
// if (Object.keys(lngs).length == 0){
|
||||
// lngs.en = { nativeName: 'English' };
|
||||
// }
|
||||
|
||||
// vi only
|
||||
lngs.vi = { nativeName: 'Vietnamese' };
|
||||
|
||||
const renderI18n = () => {
|
||||
document.documentElement.setAttribute('lang', i18next.resolvedLanguage);
|
||||
|
|
@ -203,9 +208,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||
.use(i18nextChainedBackend)
|
||||
.use(i18nextBrowserLanguageDetector)
|
||||
.init({
|
||||
debug: false,
|
||||
// lng: 'vi', // if you're using a language detector, do not define the lng option
|
||||
debug: true,
|
||||
supportedLngs: Object.keys(lngs),
|
||||
fallbackLng: Object.keys(lngs)[0],
|
||||
fallbackLng: Object.keys(lngs)[1], // vi fallback to en
|
||||
load: 'languageOnly',
|
||||
backend: {
|
||||
backends: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue