- Wordpress improvements - Multi-language support

- Styling of the administrative interface in line with askeveai.com website
This commit is contained in:
Josako
2024-08-15 16:44:54 +02:00
parent c2177fe9ea
commit 688f2300b9
9 changed files with 585 additions and 49 deletions

View File

@@ -1,12 +1,13 @@
// static/js/eveai-sdk.js
class EveAI {
constructor(tenantId, apiKey, domain, language) {
constructor(tenantId, apiKey, domain, language, languages) {
this.tenantId = tenantId;
this.apiKey = apiKey;
this.domain = domain;
this.language = language;
this.languages = languages;
console.log('EveAI constructor:', { tenantId, apiKey, domain });
console.log('EveAI constructor:', { tenantId, apiKey, domain, language, languages });
}
initializeChat(containerId) {
@@ -19,6 +20,7 @@ class EveAI {
chatWidget.setAttribute('api-key', this.apiKey);
chatWidget.setAttribute('domain', this.domain);
chatWidget.setAttribute('language', this.language);
chatWidget.setAttribute('languages', this.languages);
});
} else {
console.error('Container not found');