# File app/models/translation.rb, line 125
  def self.search_for(str, lang=Language.current, on_trans=true, on_base=true)
    res = []
    if on_trans
      res += lang.translations.select {|tr| tr.translated and
        tr.translated.downcase.include? str.downcase}
    end
    if on_base
      res += lang.translations.select {|tr| tr.base and
        tr.base.downcase.include? str.downcase}
    end

    res.flatten.uniq
  end