Sha256: 795a16da676db19ff58255e65db77c4bb00287d72e273f4cd0f71aa47ca98f0a
Contents?: true
Size: 982 Bytes
Versions: 5
Compression:
Stored size: 982 Bytes
Contents
module TranslationCenter module ApplicationHelper # get the current user the language translating from def from_lang session[:lang_from] end # get the current user the language translating to def to_lang session[:lang_to] end # returns the display name of the language def language_name(lang) TranslationCenter::CONFIG['lang'][lang.to_s] end # returns the current status filter for translation keys def current_filter session[:current_filter] end # returns true if the current filter is equal to the passed filter def current_filter_is?(filter) session[:current_filter] == filter end # returns true if the current user can admin translations def translation_admin? current_user.respond_to?(:can_admin_translations?) && current_user.can_admin_translations? end # returns formated date def format_date(date) date.strftime('%e %b %Y') end end end
Version data entries
5 entries across 5 versions & 1 rubygems