Skip to content

TagSpaces is an offline, open source, document manager with tagging support

adding current language to the core api

uggrockfe34b572f60e
diff --git a/data/ext/editorHTML/extension.js b/data/ext/editorHTML/extension.js
index f8f74b824..8ef45de4f 100644
--- a/data/ext/editorHTML/extension.js
+++ b/data/ext/editorHTML/extension.js
@@ -38,15 +38,13 @@ define(function(require, exports, module) {
$containerElement.empty();
$containerElement.css("background-color", "white");
- var lng = $.i18n.lng();
-
var extPath = extensionDirectory + "/index.html";
$containerElement.append($('<iframe>', {
id: "iframeViewer",
sandbox: "allow-same-origin allow-scripts",
scrolling: "no",
style: "background-color: white; overflow: hidden;",
- src: extPath + "?cp=" + filePath + "&setLng=" + lng,
+ src: extPath + "?cp=" + filePath + "&setLng=" + TSCORE.currentLanguage,
"nwdisable": "",
"nwfaketop": ""
}));
diff --git a/data/js/core.api.js b/data/js/core.api.js
index bace552f1..7c54e1d19 100644
--- a/data/js/core.api.js
+++ b/data/js/core.api.js
@@ -22,6 +22,7 @@ define(function(require, exports, module) {
var currentPath;
var currentLocationObject;
var currentPerspectiveID;
+ var currentLanguage;
// Current selected files
var selectedFiles = [];
// Current directory list of files
@@ -120,6 +121,7 @@ define(function(require, exports, module) {
tsIOApi.initMainMenu();
}
});
+ currentLanguage = language;
}
function initKeyBindings() {
@@ -501,6 +503,7 @@ define(function(require, exports, module) {
// Public variables definition
exports.currentPath = currentPath;
+ exports.currentLanguage = currentLanguage;
exports.currentLocationObject = currentLocationObject;
exports.currentPerspectiveID = currentPerspectiveID;
exports.selectedFiles = selectedFiles;