mirror of
https://github.com/documize/community.git
synced 2025-08-05 21:45:28 +02:00
Add de-DE locale
This commit is contained in:
parent
6b498a74c6
commit
b77b4abdc2
4 changed files with 764 additions and 10 deletions
|
@ -9,7 +9,7 @@ import Service, { inject as service } from '@ember/service';
|
|||
import $ from 'jquery';
|
||||
|
||||
export default Service.extend({
|
||||
langs: { enUS: [] },
|
||||
langs: { enUS: [], deDE: [] },
|
||||
locales: [],
|
||||
session: service(),
|
||||
|
||||
|
@ -18,6 +18,9 @@ export default Service.extend({
|
|||
$.getJSON("/i18n/en-US.json", (data) => {
|
||||
this.langs.enUS = data;
|
||||
});
|
||||
$.getJSON("/i18n/de-DE.json", (data) => {
|
||||
this.langs.deDE = data;
|
||||
});
|
||||
},
|
||||
|
||||
localize(key, ...args) {
|
||||
|
@ -27,6 +30,9 @@ export default Service.extend({
|
|||
case "en-US":
|
||||
str = this.langs.enUS[key];
|
||||
break;
|
||||
case "de-DE":
|
||||
str = this.langs.deDE[key];
|
||||
break;
|
||||
default:
|
||||
str = this.langs.enUS[key];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue