Basic dialog intl support for level dialogs, Issue #42

This commit is contained in:
Peter Cottle 2013-02-23 13:32:45 -08:00
parent 2837315c7d
commit 2617357460
21 changed files with 1716 additions and 1388 deletions

View file

@ -1,10 +1,19 @@
var _ = require('underscore');
var constants = require('../util/constants');
exports.isBrowser = function() {
var inBrowser = String(typeof window) !== 'undefined';
return inBrowser;
};
exports.getLocale = function() {
if (constants.GLOBAL.locale) {
return constants.GLOBAL.locale;
}
console.warn('No locale found...');
return 'en';
};
exports.splitTextCommand = function(value, func, context) {
func = _.bind(func, context);
_.each(value.split(';'), function(command, index) {