YKT.GoogleTranslation
1.0.1
See the version list below for details.
dotnet add package YKT.GoogleTranslation --version 1.0.1
NuGet\Install-Package YKT.GoogleTranslation -Version 1.0.1
<PackageReference Include="YKT.GoogleTranslation" Version="1.0.1" />
paket add YKT.GoogleTranslation --version 1.0.1
#r "nuget: YKT.GoogleTranslation, 1.0.1"
// Install YKT.GoogleTranslation as a Cake Addin #addin nuget:?package=YKT.GoogleTranslation&version=1.0.1 // Install YKT.GoogleTranslation as a Cake Tool #tool nuget:?package=YKT.GoogleTranslation&version=1.0.1
谷歌在线翻译插件
谷歌在线翻译插件由易酷天团队提供技术支持,提供了两种对接模式资源包引用和接口对接,翻译结果均直接与谷歌翻译引擎对接,目前在V1.0版本中实现了单文本对接,后期将会实现数据结构和附件翻译功能。如有其他个性化定制需要可以随时咨询,官网地址为:http://yikutian.com
1、Nuget包引用对接
1)在Nuget管理端查询YKT.GoogleTranslation,引用添加即可
2、静态方法直接调用
提供了四个参数,分别为AppKey、翻译的内容、源语种(可用EnumTranslation枚举直接调用)、目标语种(可用EnumTranslation枚举直接调用),具体如下
GoogleTranslation.GoogleTranslate(
"AppKey",
“翻译的内容",
EnumTranslation.中文,
EnumTranslation.英文
)
调用方法及入参示例:
GoogleTranslation.GoogleTranslate("82EEE258-2F02-0A98-ADAA-D8D4243BFA0F", "你好", EnumTranslation.中文,EnumTranslation.英文)
翻译结果示例:
{"data":"Hello","success":true,"message":"翻译成功"}
data为翻译结果
为了更好的服务用户提供了AppKey,在调用时可以使用以下AppKey调用,每个仅使用一次
46C94C48-0A8E-C63A-D34F-D289033F0F29 34990850-2A47-D5D5-5224-4DB004696AD0 FFCF14FC-7E79-D6CB-1D04-56792EB5E38D 94AB21E8-7B43-FE66-1783-2EE9CE817976 DD274F81-91B0-C479-8360-A7F719416BF8 652A58B3-9D84-0091-B10A-6689DA90FC15 D47EDD89-6D6C-435F-8F6C-9839C8ACAFCC AE1AE088-F928-63A7-36ED-3BA15CA9EE06 C9502E2B-266C-1ABD-ED91-4F7A4999B562 3872D297-472A-CBAE-DF10-B5B8923C5297 F7F197BB-58BA-5F56-37C5-BF258D33B013 4BCE50AD-5684-879B-B932-88DE2422414C 33310506-61B1-F7AC-1031-833ECB8425B1 1264C91C-8B5C-ED0B-F8D3-5F0FA79493EA E24D76C7-B3DF-1537-9103-437066552A76 F65E8E64-1A1D-11BC-9F9F-C6A801D321E3 EE65ED18-B587-A7EA-86E0-E65590D615F7 72D0B9EF-5C67-EE65-DDA2-E0947825B17B 41DFBFBB-AEA1-269D-5908-C39D0F6F6E29 82EEE258-2F02-0A98-ADAA-D8D4243BFA0
2、接口对接
支持http Post和Get请求协议,具体如下
请求地址:http://yikutian.com/api/translation?AppKey=XX&TimeSpan=XXXOriginLang=XXX&TransLang=Data=待翻译结果
1)AppKey可以使用以下数据,如果已被使用可以登录官网免费申请 http://yikutian.com
46C94C48-0A8E-C63A-D34F-D289033F0F29 34990850-2A47-D5D5-5224-4DB004696AD0 FFCF14FC-7E79-D6CB-1D04-56792EB5E38D 94AB21E8-7B43-FE66-1783-2EE9CE817976 DD274F81-91B0-C479-8360-A7F719416BF8 652A58B3-9D84-0091-B10A-6689DA90FC15 D47EDD89-6D6C-435F-8F6C-9839C8ACAFCC AE1AE088-F928-63A7-36ED-3BA15CA9EE06 C9502E2B-266C-1ABD-ED91-4F7A4999B562 3872D297-472A-CBAE-DF10-B5B8923C5297 F7F197BB-58BA-5F56-37C5-BF258D33B013 4BCE50AD-5684-879B-B932-88DE2422414C 33310506-61B1-F7AC-1031-833ECB8425B1 1264C91C-8B5C-ED0B-F8D3-5F0FA79493EA E24D76C7-B3DF-1537-9103-437066552A76 F65E8E64-1A1D-11BC-9F9F-C6A801D321E3 EE65ED18-B587-A7EA-86E0-E65590D615F7 72D0B9EF-5C67-EE65-DDA2-E0947825B17B 41DFBFBB-AEA1-269D-5908-C39D0F6F6E29 82EEE258-2F02-0A98-ADAA-D8D4243BFA0
2)TimeSpan:时间戳,当前时间即可(格式yyyyMMddHHmmss)
3)OriginLang:分别为zh-CN、en、ja
4)TransLang:分别为zh-CN、en、ja
5)Data:带翻译的内容,如 你好
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.