From b30a7c07087a186d8aa9f0a7c674d3e07549f955 Mon Sep 17 00:00:00 2001 From: loblao <12ksit@gmail.com> Date: Sat, 3 Sep 2016 11:47:26 -0300 Subject: [PATCH] Nav: Add a (temporary) dropdown to allow user to change language --- controller/Controller.class.php | 2 ++ controller/action/i18nActions.class.php | 33 +++++++++++++++++++++++++ view/template/nav/_globalItems.php | 12 ++++++++- web/js/global.js | 11 ++++++++- 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 controller/action/i18nActions.class.php diff --git a/controller/Controller.class.php b/controller/Controller.class.php index f0bafa9b..7872cf22 100644 --- a/controller/Controller.class.php +++ b/controller/Controller.class.php @@ -94,6 +94,8 @@ class Controller $router->any('/list/subscribe', 'MailActions::executeSubscribe'); $router->get('/list/confirm/{hash}', 'MailActions::executeConfirm'); + $router->post('/language', 'i18nActions::setCulture'); + $permanentRedirects = [ '/lbry-osx-latest.dmg' => '/get', '/lbry-linux-latest.deb' => '/get', diff --git a/controller/action/i18nActions.class.php b/controller/action/i18nActions.class.php new file mode 100644 index 00000000..f7fc492a --- /dev/null +++ b/controller/action/i18nActions.class.php @@ -0,0 +1,33 @@ +