Module GLoc::Helpers
In: lib/gloc-helpers.rb

These helper methods will be included in the InstanceMethods module.

Methods

Public Instance methods

[Source]

    # File lib/gloc-helpers.rb, line 12
12:     def l_YesNo(value)         l(value ? :general_text_Yes : :general_text_No) end

[Source]

   # File lib/gloc-helpers.rb, line 6
6:     def l_age(age)             lwr :general_fmt_age, age end

[Source]

   # File lib/gloc-helpers.rb, line 7
7:     def l_date(date)           l_strftime date, :general_fmt_date end

[Source]

   # File lib/gloc-helpers.rb, line 8
8:     def l_datetime(date)       l_strftime date, :general_fmt_datetime end

[Source]

   # File lib/gloc-helpers.rb, line 9
9:     def l_datetime_short(date) l_strftime date, :general_fmt_datetime_short end

[Source]

    # File lib/gloc-helpers.rb, line 15
15:     def l_lang_name(lang, display_lang=nil)
16:       ll display_lang || current_language, "general_lang_#{lang}"
17:     end

[Source]

    # File lib/gloc-helpers.rb, line 10
10:     def l_strftime(date,fmt)   date.strftime l(fmt) end

[Source]

    # File lib/gloc-helpers.rb, line 11
11:     def l_time(time)           l_strftime time, :general_fmt_time end

[Source]

    # File lib/gloc-helpers.rb, line 13
13:     def l_yesno(value)         l(value ? :general_text_yes : :general_text_no) end

[Validate]