1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-16 13:44:31 +02:00

localization based on markdown

This commit is contained in:
Pomax
2017-02-13 17:27:52 -08:00
parent 59f4bea20b
commit f2eeab6a21
61 changed files with 862 additions and 27032 deletions

19
lib/locale.js Normal file
View 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;