This is a simple plugin designed to help you expand your knowledge base while also quickly translating unfamiliar words or sentences and generating flashcards that can be plugged into your notebook. In addition, you can also save the translation engine's pronunciation files to your vault, and you can also record your own pronunciation if you want.
- Configure the Translation Engine
- Right-click on words for translation (You can record your own pronunciation)
- Youdao Translation
- Google Translate
- Microsoft Translator
- Create a Custom Strategy Class: Implement the abstract class
TranslationStrategy
. - Add your custom strategy class to
TranslateEngines
:- Make a request to your custom translation engine.
- Parse the response and encapsulate it as a
TranslateResponse
type response.
- Add a unique configuration item for your translation engine in
setting.ts
.
This guide provides a clear and concise explanation of how to utilize the plugin for translating and learning purposes. By following these steps, you can easily integrate a translation engine into your workflow, enhancing your ability to understand and retain new information.