class Dragoman::Translator

Public Class Methods

translate_path(path, locale) click to toggle source
# File lib/dragoman/translator.rb, line 5
def self.translate_path path, locale
  return path if path.blank?
  parsed_path = Dragoman::Journey::Parser.new.parse(path.to_s)
  Dragoman::TranslationVisitor.new(locale).accept(parsed_path)
end