iOS中的本地化工作流BartyCrouch和Microsoft Translator API

发布于 2025-01-30 00:43:43 字数 438 浏览 3 评论 0原文

我有一个非常具体的问题,想知道是否有人尝试过使用BartyCrouch脚本和API.Cognitive.MicrosoftTranslanter在Swift中尝试过工作流?我有一个混合的项目:故事板 + Swiftui,我需要获得多种语言。我想我只是在第一步感到困惑。我有一个与BartyCrouch一起工作的小型测试项目,是否只是从Azure翻译的开箱即用? 欢迎网络上的任何代码示例。

有一些关于将Google翻译为两年前的框架的功能的讨论。不知道我们现在在哪里。 https://github.com/flinedev/flinedev/bartyev/bartycrouch/issues/160

I have a very specific question, was wondering has anyone tried workflow with BartyCrouch script and api.cognitive.microsofttranslator in Swift? I have a mixed project : Storyboards + SwiftUI that i needs to get multiple languages. I guess I am just confused on the first steps. I have a small test project working with BartyCrouch is it just out of the box translating from Azure?
Any code examples on the web are welcome.

There was some talk of adding Google translate as a feature to the framework, from 2 years ago. Not sure where we are now.
https://github.com/FlineDev/BartyCrouch/issues/160

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼泪都笑了 2025-02-06 00:43:43

因此,一切都以正确的方式设置了Bartycrouch和Azure后一切工作。如果有人在寻找,这些步骤就在这里。

  1. 设置Azure Translator实例
  • 这花了一段时间,因为我需要全球区域并免费使这项工作免费
    首先设置订阅,而不是资源,而不是在这种情况下通过翻译将其连接到您的订阅。这将产生BartyCrouch所需的秘密键才能连接到API。
    使用钥匙和全局,我们可以测试翻译是否与Curl/Postman合作
  1. 配置您在安装BC时生成的.toml文件(我从Homebrew中使用)。在这里有一个通往我的localizable.strings文件[./ your-app“]的途径。我必须将trans添加到.toml文件中的任务

  2. plot bartycrouch 脚本中的任务中,并运行构建

BartyCrouch更新-X

  1. 确保添加新的本地化文件和新语言时,以在“”“空字符串”中的所有翻译中

向您发送快乐的本地化。

So everything worked after setting up the BartyCrouch and Azure in a right way. The steps are here if anyone is looking for.

  1. Setting up Azure Translator instance
  • this took a while as I needed the GLOBAL region and to make this work free of charge
    First set the Subscription and than Resource and than connect it to your Subscription via Translator in this case. This will generate secret key that we need for BartyCrouch to connect to the api.
    With the key and global we can test if translation is working with CURL/Postman
  1. Configure the .toml file that you generated when installing BC (I did from Homebrew). Had issue here with a paths to my Localizable.strings file ["./your-app"]. I had to add translate to the tasks in .toml file

  2. Place BartyCrouch script into BuildPhases and run build

bartycrouch update -x

  1. Make sure when adding a new Localizable.string file and new language to have all the translations in "" empty string

Happy localization to you..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文