diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-07-07 12:24:48 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-07-07 12:24:48 +0100 |
commit | 5620a883d818f7130e7e15bcfcb86854d3fc8005 (patch) | |
tree | 80de9cbaf1ab7fc37545d7c6083940b3163756ff /app/helpers/application_helper.rb | |
parent | d0dcb5678e4807e558c1dbc8847d9e152422f3e9 (diff) |
get language names from a comprehensive list, rather than just hard-code a handful
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 5 |
1 files changed, 5 insertions, 0 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) |