Class: Imap::Backup::Translator

Inherits:
Object
  • Object
show all
Defined in:
lib/imap/backup/translator.rb

Overview

Handles internationalization (i18n) setup and locale detection.

Constant Summary collapse

FALLBACK_LOCALE =
:en

Instance Method Summary collapse

Instance Method Details

#setupObject

Initializes i18n with the detected locale. Sets up load paths and configures fallbacks.



13
14
15
16
17
18
# File 'lib/imap/backup/translator.rb', line 13

def setup
  I18n.load_path = locale_files
  I18n.backend.load_translations
  I18n.default_locale = FALLBACK_LOCALE
  I18n.locale = detect_locale
end