mirror of
https://github.com/documize/community.git
synced 2025-08-05 05:25:27 +02:00
French localization
This commit is contained in:
parent
ea9ff78411
commit
76c777acc1
4 changed files with 13 additions and 5 deletions
|
@ -9,7 +9,7 @@ import Service, { inject as service } from '@ember/service';
|
|||
import $ from 'jquery';
|
||||
|
||||
export default Service.extend({
|
||||
langs: { enUS: [], deDE: [] , zhCN: [], ptBR: [] },
|
||||
langs: { enUS: [], deDE: [] , zhCN: [], ptBR: [], frFR: [] },
|
||||
locales: [],
|
||||
session: service(),
|
||||
|
||||
|
@ -27,6 +27,9 @@ export default Service.extend({
|
|||
$.getJSON("/i18n/pt-BR.json", (data) => {
|
||||
this.langs.ptBR = data;
|
||||
});
|
||||
$.getJSON("/i18n/fr-FR.json", (data) => {
|
||||
this.langs.frFR = data;
|
||||
});
|
||||
},
|
||||
|
||||
localize(key, ...args) {
|
||||
|
@ -45,6 +48,9 @@ export default Service.extend({
|
|||
case "pt-BR":
|
||||
str = this.langs.ptBR[key];
|
||||
break;
|
||||
case "fr-FR":
|
||||
str = this.langs.frFR[key];
|
||||
break;
|
||||
}
|
||||
|
||||
if (_.isUndefined(str)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue