v3.12.0

xnx3/translatev3.12.0Dec 17, 2024by xnx3

AI Summary

Enhances enterprise translation logic with priority handling for enterprise channels and adds manual target language specification. Introduces a setting to force local language translation.

Key Highlights

  • Enterprise translation channel now takes priority over service channels.
  • Manual target language specification in `translate.request.translateText`.
  • New setting `translate.language.translateLocal = true` for forcing local translation.

Breaking Changes

  • If `translate.enterprise.use()` is used, `translate.service.use('xxx')` becomes invalid.

New Features

  • Manual translation to any specified target language.
  • Force local language translation configuration.

Full Release Notes

- 优化 如果使用了 translate.enterprise.use() ,那么 translate.service.use('xxx') 将会失效,有企业翻译通道根据翻译可用情况自行分配	637319b
- translate.request.translateText 手动调用接口进行翻译操作的能力,增加对目标语种的指定,可以翻译为任何你想翻译的语种,而不是只能是当前所显示的语种	a9be132
- 增加 translate.language.translateLocal = true; 的设置 :本地语种也进行强制翻译	8930446

**Full Changelog**: https://github.com/xnx3/translate/compare/v3.11.11...v3.12.0