1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-18 20:59:43 +02:00

Update i18n.js

Added Italian language support
This commit is contained in:
Armando Marra 2023-09-08 09:06:48 +02:00 committed by GitHub
parent f4b45d2aa7
commit ab8582e807
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ import Service, { inject as service } from '@ember/service';
import $ from 'jquery';
export default Service.extend({
langs: { enUS: [], deDE: [] , zhCN: [], ptBR: [], frFR: [], jaJP: [] },
langs: { enUS: [], deDE: [] , zhCN: [], ptBR: [], frFR: [], jaJP: [], itIT: [] },
locales: [],
session: service(),
@ -33,6 +33,9 @@ export default Service.extend({
$.getJSON("/i18n/ja-JP.json", (data) => {
this.langs.jaJP = data;
});
$.getJSON("/i18n/it-IT.json", (data) => {
this.langs.itIT = data;
});
},
localize(key, ...args) {
@ -57,6 +60,9 @@ export default Service.extend({
case "ja-JP":
str = this.langs.jaJP[key];
break;
case "it-IT":
str = this.langs.itIT[key];
break;
}
if (_.isUndefined(str)) {