def destination(dest)
      # The url needs to be unescaped in order to preserve the correct filename
      path = File.join(dest, @dir, CGI.unescape(url))

      if ext == '.html' && _localization_original_url !~ /\.html\z/
        path.sub!(Localization::LANG_END_RE, '')
        File.join(path, "index#{ext}#{@lang_ext}")
      else
        path
      end
    end
def destination(dest)
      # The url needs to be unescaped in order to preserve the correct filename
      path = File.join(dest, @dir, CGI.unescape(url))

      if ext == '.html' && _localization_original_url !~ /\.html\z/
        path.sub!(Localization::LANG_END_RE, '')
        File.join(path, "index#{ext}#{@lang_ext}")
      else
        path
      end
    end
Overwrites the original method to cater for language extension in output
 file name.