Module: Archangel::ApplicationHelper
- Includes:
- FontAwesome::Rails::IconHelper
- Defined in:
- app/helpers/archangel/application_helper.rb
Overview
Application helpers
Instance Method Summary collapse
-
#locale ⇒ String
Site locale.
-
#text_direction ⇒ String
Language direction (“ltr” or “rtl”).
Instance Method Details
#locale ⇒ String
Site locale. Default ‘en`
Example
<%= locale %> #=> "en"
18 19 20 |
# File 'app/helpers/archangel/application_helper.rb', line 18 def locale current_site.locale || Archangel::LANGUAGE_DEFAULT end |
#text_direction ⇒ String
Language direction (“ltr” or “rtl”). Default ‘ltr`
Example
<%= text_direction %> #=> "ltr"
30 31 32 |
# File 'app/helpers/archangel/application_helper.rb', line 30 def text_direction Archangel.t("language.#{locale}.direction", default: "ltr") end |