feat: json format, et al.

This commit is contained in:
Subarashimo
2025-12-03 14:55:30 +01:00
parent 56349f30e6
commit 0f7fdfcef1
28 changed files with 5692 additions and 237 deletions
+3 -2
View File
@@ -87,8 +87,9 @@ class Internationalization {
});
}
getTranslation(key) {
return this.translations[key] || null;
getTranslation(key, fallback = null) {
// Return translation, or fallback, or the key itself (prevents "null" from showing)
return this.translations[key] || fallback || key;
}
async setLanguage(lang) {