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

These helper methods will be included in the InstanceMethods module.

### Methods

l_YesNo l_age l_date l_datetime l_datetime_short l_lang_name l_strftime l_time l_yesno

### Public Instance methods

l_YesNo(value)

[Source]

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

l_age(age)

[Source]

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

l_date(date)

[Source]

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

l_datetime(date)

[Source]

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

l_datetime_short(date)

[Source]

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

l_lang_name(lang, display_lang=nil)

[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

l_strftime(date,fmt)

[Source]

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

l_time(time)

[Source]

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

l_yesno(value)

[Source]

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

[Validate]