8000 GitHub - wytxer/nestjs-translate: 基于 Nestjs 封装的翻译 API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wytxer/nestjs-translate

Repository files navigation

NESTJS TRANSLATE

基于 Nestjs 封装的翻译 API,目前支持百度翻译和有道翻译,持续更新中。

使用

导入模块:

import { TranslateBaiduModule } from 'nest-translate'

@Module({
  imports: [
    TranslateBaiduModule.forRoot({ appid: '', secret: '' })
  ]
})

使用:

import { TranslateBaiduService } from 'nest-translate'

@Injectable()
export class UserService {
  constructor(private readonly translateBaiduService: TranslateBaiduService) {}
}

当成工具类使用:

import { TranslateBaiduService } from 'nest-translate'

const translate = new TranslateBaiduService({ appid: '', secret: '' })

使用文档

License

MIT

About

基于 Nestjs 封装的翻译 API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0