aboutsummaryrefslogtreecommitdiff
path: root/assets/js/ps-app.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/ps-app.js')
-rw-r--r--assets/js/ps-app.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/assets/js/ps-app.js b/assets/js/ps-app.js
index da6442e..7675ec4 100644
--- a/assets/js/ps-app.js
+++ b/assets/js/ps-app.js
@@ -23,6 +23,21 @@
return false
})
+ // EN/FR switch
+ $('footer')
+ .append('<button id="lang-switch" title="Read in English">EN</button>')
+ $('#lang-switch').click(function(e) {
+ var lang = $('html').attr('lang')
+ if (lang == 'fr') {
+ $('html').attr('lang', 'en')
+ $(e.target).html('FR').attr('title', 'Lire en français')
+ } else {
+ $('html').attr('lang', 'fr')
+ $(e.target).html('EN').attr('title', 'Read in English')
+ }
+ return false
+ })
+
});
})($)