Skip to content
Snippets Groups Projects
Commit 1b050ba0 authored by Albert Gräf's avatar Albert Gräf
Browse files

Switch to the actual system locale at startup if we have translations for it....

Switch to the actual system locale at startup if we have translations for it. Otherwise fall back to the default 'en' locale.
parent c62d93da
No related branches found
No related tags found
No related merge requests found
"use strict"; "use strict";
var lang = require('./locales/en/translation.json'); var lang;
try {
// try the locale given by navigator.language
lang = require('./locales/'+navigator.language+'/translation.json');
} catch (e) {
// if that fails then fall back to the default locale 'en'
lang = require('./locales/en/translation.json');
}
exports.lang = lang; exports.lang = lang;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment