mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-31 20:11:59 +02:00
localization based on markdown
This commit is contained in:
@@ -33,6 +33,7 @@ var options = {
|
||||
// convert this LaTeX code into an SVG file in ./images/latex,
|
||||
// using mathjax-node in the ./tools directory.
|
||||
var hash = sha1(latex);
|
||||
|
||||
var filename = "images/latex/" + hash + ".svg";
|
||||
var destination = __dirname + "/../" + filename;
|
||||
|
||||
|
19
lib/locale.js
Normal file
19
lib/locale.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var enData = require('../locales/en-GB/content.js');
|
||||
|
||||
class Locale {
|
||||
constructor(locale) {
|
||||
this.data = {};
|
||||
this.locale = locale || "en-GB";
|
||||
this.data = enData;
|
||||
}
|
||||
|
||||
getContent(key, handler) {
|
||||
return this.data[key].getContent(handler);
|
||||
}
|
||||
|
||||
getTitle(key) {
|
||||
return this.data[key].title;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Locale;
|
Reference in New Issue
Block a user