Directory Translation

If you need to preserve the directory structure of files, you must use the directory upload method (e.g., by setting the directory attribute). This allows you to obtain the relative path information via the file's webkitRelativePath. You can leverage this attribute in the beforeUpload hook to pass the file's path information to the backend. For example, you can change the file's name attribute to file.webkitRelativePath, so that the complete directory structure information is included during the upload.

Why Develop md-translator?

Before developing md-translator, I tested the following tools. However, they failed to meet my needs due to their respective limitations. Here is a brief summary of their characteristics for your reference.

  • GT4T: Supports batch translation of Markdown. Users can drag an entire folder into the GT4T file translator to automatically translate all the Markdown files within it. However, the tool is for commercial use only. Even when adding a custom API, payment is still required, making it less friendly for individual users.
  • Markdown Docs Translator: An open-source and free Markdown translation tool that performs translations using a web-based interface. However, the translation speed is slow, and it is prone to interruptions when processing long texts.