module TranslationHelper

  def qit(slug, content = nil, &block)
      
    content = capture(&block) if block_given?
    
    
    slug = slug.to_slug
    t = Translation.where(:key => slug, :locale => I18n.locale).first
    if t
      
    else
      t = Translation.create(:key => slug, :locale => "fr", :value => content)
      t = Translation.create(:key => slug, :locale => "en", :value => content)
    
    end
    raw t.value
  end

end
