module I18n::Backend::Base
def interpolate(locale, string, values = {})
interpolate "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X'
Interpolates values into a given string.
def interpolate(locale, string, values = {}) if string.is_a?(::String) && !values.empty? I18n.interpolate(string, values) else string end end