Skip to content

Commit

Permalink
Added random language picker
Browse files Browse the repository at this point in the history
  • Loading branch information
lmarkus committed Nov 22, 2013
1 parent 26f6a4c commit 7cbbbf6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ module.exports = function (server) {

server.get('/', function (req, res) {
var model = { name: 'kraken-localization' };


var languages = ["en-US", "fr-CA", "es-ES", "tlh-US"];
res.locals.context = {
locality: languages[ parseInt(Math.random() * 4) ]
};

res.render('index', model);

});

};

0 comments on commit 7cbbbf6

Please sign in to comment.