aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb5
-rwxr-xr-xapp/helpers/link_to_helper.rb8
2 files changed, 6 insertions, 7 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e46404a72..9bdcb98cd 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -6,6 +6,7 @@
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
# $Id: application_helper.rb,v 1.22 2008-07-09 07:24:50 francis Exp $
+require 'languages'
module ApplicationHelper
# URL generating functions are needed by all controllers (for redirects),
@@ -66,6 +67,10 @@ module ApplicationHelper
t = highlight_words(t, words, html)
return t
end
+
+ def locale_name(locale)
+ return LanguageNames::get_language_name(locale)
+ end
# Use our own algorithm for finding path of cache
def foi_cache(name = {}, options = nil, &block)
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 12f19a312..935912a61 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -203,12 +203,6 @@ module LinkToHelper
params['locale'] = locale
return url_for(params)
end
-
- def locale_name(locale)
- return "English" if locale == "en"
- return "Srpski" if locale == "sr"
- return "Shqip" if locale == "sq"
- return locale
- end
+
end