Sha256: c1df70deeb7848efca9b8937c5cec644cc395084d525fcc659df84c5d57a3ac4

Contents?: true

Size: 655 Bytes

Versions: 8

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true

module Archangel
  ##
  # Application helpers
  #
  module ApplicationHelper
    include FontAwesome::Rails::IconHelper

    ##
    # Site locale. Default `en`
    #
    # Example
    #   <%= locale %> #=> "en"
    #
    # @return [String] site locale
    #
    def locale
      current_site.locale || Archangel::LANGUAGE_DEFAULT
    end

    ##
    # Language direction ("ltr" or "rtl"). Default `ltr`
    #
    # Example
    #   <%= text_direction %> #=> "ltr"
    #
    # @return [String] language direction
    #
    def text_direction
      Archangel.t("language.#{locale}.direction", default: "ltr")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
archangel-0.3.0 app/helpers/archangel/application_helper.rb
archangel-0.0.8 app/helpers/archangel/application_helper.rb
archangel-0.0.7 app/helpers/archangel/application_helper.rb
archangel-0.0.6 app/helpers/archangel/application_helper.rb
archangel-0.0.5 app/helpers/archangel/application_helper.rb
archangel-0.0.4 app/helpers/archangel/application_helper.rb
archangel-0.0.3 app/helpers/archangel/application_helper.rb
archangel-0.0.2 app/helpers/archangel/application_helper.rb