Class: LokaliseRails::GlobalConfig

Inherits:
LokaliseManager::GlobalConfig
  • Object
show all
Defined in:
lib/lokalise_rails/global_config.rb

Overview

Inherits from LokaliseManager::GlobalConfig to provide a global configuration specific to the LokaliseRails gem. This class is primarily used to manage configuration settings that affect how the LokaliseRails gem operates within a Ruby on Rails application, particularly in managing locale paths.

Class Method Summary collapse

Class Method Details

.locales_pathString

Provides the path to the locales directory where translation files are stored. If not set explicitly, it defaults to the ‘config/locales` directory within the root of the application using this gem.

Returns:

  • (String)

    the path to the locales directory



13
14
15
16
# File 'lib/lokalise_rails/global_config.rb', line 13

def locales_path
  # If @locales_path is not set, it defaults to a path under the application's root directory.
  @locales_path || "#{LokaliseRails::Utils.root}/config/locales"
end