class Alephant::Renderer::I18n::Json
Private Instance Methods
load_translations()
click to toggle source
# File lib/alephant/renderer/i18n/json.rb, line 9 def load_translations return unless i18n_lib.load_path.empty? translations_files.map do |file| store_translation(file) end end
store_translation(file)
click to toggle source
# File lib/alephant/renderer/i18n/json.rb, line 16 def store_translation(file) translations = JSON.parse(File.read(file)) translations.each do |locale, content| i18n_lib.backend.store_translations(locale, content) end end
translation_filename()
click to toggle source
# File lib/alephant/renderer/i18n/json.rb, line 23 def translation_filename File.join(translations_path, '*.json') end