feat: Taking a first stab at implementing translations
parent
9aeb53c261
commit
46f994c0ff
@ -0,0 +1,25 @@
|
||||
function updateContent() {
|
||||
update();
|
||||
$("body").localize();
|
||||
}
|
||||
|
||||
i18next
|
||||
.use(i18nextXHRBackend)
|
||||
.use(i18nextBrowserLanguageDetector)
|
||||
.init({
|
||||
fallbackLng: 'en',
|
||||
debug: true,
|
||||
backend: {
|
||||
loadPath: 'locales/{{lng}}.json',
|
||||
},
|
||||
}, function(err, t) {
|
||||
jqueryI18next.init(i18next, $);
|
||||
i18next.on('languageChanged', () => {
|
||||
updateContent();
|
||||
});
|
||||
|
||||
// init set content
|
||||
$(document).ready(initialize);
|
||||
$(document).on("input", updateContent);
|
||||
$('input[type = radio]').on("change", updateContent);
|
||||
});
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"patterns": {
|
||||
"decreasing": "Decreasing",
|
||||
"fluctuating": "Fluctuating",
|
||||
"unknown": "I don't know",
|
||||
"large-spike": "Large Spike",
|
||||
"small-spike": "Small Spike"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue