Sha256: d0baf81fe929dc031ac43ba7195db39f220bee13ad1212670de84eb689036504

Contents?: true

Size: 1.8 KB

Versions: 79

Compression:

Stored size: 1.8 KB

Contents

#This file can be symlinked and thereby easily translated by POEdit. Further more the static methods can be used for stuff.
module Knj::Locales
  #Returns an array of translated day-names ('_'-method must exist!).
  #===Examples
  # Knj::Locales.days_arr #=> ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
  def self.days_arr
    return [_("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday"), _("Sunday")]
  end
  
  #Returns an array of short translated day-names.
  #===Examples
  # Knj::Locales.days_short_arr #=> ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
  def self.days_short_arr
    return [_("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun")]
  end
  
  #Returns an array of translated month-names.
  #===Examples
  # Knj::Locales.months_arr #=> ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
  def self.months_arr
    return [_("January"), _("February"), _("March"), _("April"), _("May"), _("June"), _("July"), _("August"), _("September"), _("October"), _("November"), _("December")]
  end
  
  #Returns an array of translate 'ago'-strings. View the source to see which.
  def self.ago_strings
    return {
      :year_ago_str => _("%s year ago"),
      :years_ago_str => _("%s years ago"),
      :month_ago_str => _("%s month ago"),
      :months_ago_str => _("%s months ago"),
      :day_ago_str => _("%s day ago"),
      :days_ago_str => _("%s days ago"),
      :hour_ago_str => _("%s hour ago"),
      :hours_ago_str => _("%s hours ago"),
      :min_ago_str => _("%s minute ago"),
      :mins_ago_str => _("%s minutes ago"),
      :sec_ago_str => _("%s second ago"),
      :secs_ago_str => _("%s seconds ago"),
      :right_now_str => _("right now")
    }
  end
end

Version data entries

79 entries across 79 versions & 1 rubygems

Version Path
knjrbfw-0.0.72 lib/knj/locale_strings.rb
knjrbfw-0.0.71 lib/knj/locale_strings.rb
knjrbfw-0.0.70 lib/knj/locale_strings.rb
knjrbfw-0.0.69 lib/knj/locale_strings.rb
knjrbfw-0.0.68 lib/knj/locale_strings.rb
knjrbfw-0.0.67 lib/knj/locale_strings.rb
knjrbfw-0.0.66 lib/knj/locale_strings.rb
knjrbfw-0.0.65 lib/knj/locale_strings.rb
knjrbfw-0.0.64 lib/knj/locale_strings.rb
knjrbfw-0.0.63 lib/knj/locale_strings.rb
knjrbfw-0.0.62 lib/knj/locale_strings.rb
knjrbfw-0.0.59 lib/knj/locale_strings.rb
knjrbfw-0.0.58 lib/knj/locale_strings.rb
knjrbfw-0.0.57 lib/knj/locale_strings.rb
knjrbfw-0.0.55 lib/knj/locale_strings.rb
knjrbfw-0.0.54 lib/knj/locale_strings.rb
knjrbfw-0.0.53 lib/knj/locale_strings.rb
knjrbfw-0.0.52 lib/knj/locale_strings.rb
knjrbfw-0.0.51 lib/knj/locale_strings.rb
knjrbfw-0.0.50 lib/knj/locale_strings.rb