enhanced localizer

This commit is contained in:
Saifeddine ALOUI 2024-09-01 03:51:42 +02:00
parent 28433add5c
commit ef6635c1a8

View File

@ -95,7 +95,7 @@ class WebAppLocalizer {
// helper functions
// A format prompt function
formatPrompt(prompt_name, values) {
return this.translations[this.lang].promptTranslations[prompt_name].replace(/\{(\w+)\}/g, (match, key) => values[key] || match);
return this.translations[this.currentLang].promptTranslations[prompt_name].replace(/\{(\w+)\}/g, (match, key) => values[key] || match);
}
}