Skip to content
Snippets Groups Projects
Commit 8f03cd32 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Implement JSONLD language switching

parent 921d284c
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,11 @@ export default class JSONLD { ...@@ -24,7 +24,11 @@ export default class JSONLD {
this.idToEntityNameMatchList = idToEntityNameMatchList; this.idToEntityNameMatchList = idToEntityNameMatchList;
} }
static initialize(apiUrl, successFnc, failureFnc) { static initialize(apiUrl, successFnc, failureFnc, lang = 'de') {
if (lang !== 'de') {
i18n.changeLanguage(lang);
}
// if init api call was already successfully finished execute the success function // if init api call was already successfully finished execute the success function
if (instances[apiUrl] !== undefined) { if (instances[apiUrl] !== undefined) {
if (typeof successFnc == 'function') successFnc(instances[apiUrl]); if (typeof successFnc == 'function') successFnc(instances[apiUrl]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment