Module: Archangel::ApplicationHelper

Includes:
FontAwesome::Rails::IconHelper
Defined in:
app/helpers/archangel/application_helper.rb

Overview

Application helpers

Instance Method Summary collapse

Instance Method Details

#localeString

Site locale. Default ‘en`

Example

<%= locale %> #=> "en"

Returns:

  • (String)

    site locale



18
19
20
# File 'app/helpers/archangel/application_helper.rb', line 18

def locale
  current_site.locale || Archangel::LANGUAGE_DEFAULT
end

#text_directionString

Language direction (“ltr” or “rtl”). Default ‘ltr`

Example

<%= text_direction %> #=> "ltr"

Returns:

  • (String)

    language direction



30
31
32
# File 'app/helpers/archangel/application_helper.rb', line 30

def text_direction
  Archangel.t("language.#{locale}.direction", default: "ltr")
end