aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-02-25 14:21:09 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-03-10 10:51:44 +0000
commit9fc120d3e08c9d7ea1522838103f83bd87eeba59 (patch)
treeb2eb7b8ccb25131eafaab19d7928834b048b5820 /app/helpers/link_to_helper.rb
parent4c4a4f7adae3d629b3bca37d3f7c8a11f5997664 (diff)
add global locale switcher
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rw-r--r--app/helpers/link_to_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 93151ecfe..85913b12e 100644
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -197,6 +197,12 @@ module LinkToHelper
return date.strftime("%Y").strip
end
+ #I18n locale switcher
+
+ def locale_switcher(locale, params)
+ params['locale'] = locale
+ return url_for(params)
+ end
end