Class: R18n::Locales::Th

Inherits:
R18n::Locale show all
Defined in:
lib/r18n-core/locales/th.rb

Overview

Thai locale

Instance Attribute Summary

Attributes inherited from R18n::Locale

#code, #downcased_code, #language, #parent, #region

Instance Method Summary collapse

Methods inherited from R18n::Locale

#==, capitalize, exists?, #format_date_full, #format_date_human, #format_date_standard, #format_float, #format_integer, #format_time, #format_time_full, #format_time_human, #format_time_standard, #initialize, #inspect, load, #localize, #ltr?, #month_abbrs, #month_standalone, sanitize_code, set, #supported?, #wday_abbrs

Constructor Details

This class inherits a constructor from R18n::Locale

Instance Method Details

#pluralize(_number) ⇒ Object



31
32
33
# File 'lib/r18n-core/locales/th.rb', line 31

def pluralize(_number)
  'n'
end

#strftime(time, format) ⇒ Object



35
36
37
38
# File 'lib/r18n-core/locales/th.rb', line 35

def strftime(time, format)
  year = (time.year + 543).to_s
  super(time, format.gsub('%Y', year).gsub('%y', year[-2..-1]))
end