search_file(lib_paths, dir, file)
private
@param paths load paths in which IRB find a
localized file. @param dir directory @param file basename to be localized
typically, for the parameters and a <path> in paths, it searches
<path>/<dir>/<locale>/<file>
Show source
def search_file(lib_paths, dir, file)
each_localized_path(dir, file) do |lc_path|
lib_paths.each do |libpath|
full_path = File.join(libpath, lc_path)
return full_path if File.readable?(full_path)
end
redo if defined?(Gem) and Gem.try_activate(lc_path)
end
nil
end