module ZendeskAppsSupport::I18n

Public Class Methods

set_locale(locale) click to toggle source
# File lib/zendesk_apps_support/i18n.rb, line 8
def set_locale(locale)
  i18n.locale = locale
end
t(key, *args) click to toggle source
# File lib/zendesk_apps_support/i18n.rb, line 4
def t(key, *args)
  i18n.t(key, *args)
end

Private Class Methods

i18n() click to toggle source
# File lib/zendesk_apps_support/i18n.rb, line 14
def i18n
  @i18n ||= begin
    require 'i18n'
    ::I18n.load_path += locale_files
    ::I18n
  end
end
locale_files() click to toggle source
# File lib/zendesk_apps_support/i18n.rb, line 22
def locale_files
  Dir[File.expand_path('../../../config/locales/*.yml', __FILE__)] -
    Dir[File.expand_path('../../../config/locales/*.zendesk.yml', __FILE__)]
end