I build this app because I was tired of using Google Translate to translate my locale files (i18n). I wanted to use a more efficient and accurate translation tool. ChatGPT, however, always break my json and cannot translate large contents. So I build this app to solve these problems. Hope it can save your time.<p>github: <a href="https://github.com/ObservedObserver/chatgpt-i18n">https://github.com/ObservedObserver/chatgpt-i18n</a><p>online app: <a href="https://chatgpt-i18n.vercel.app/" rel="nofollow">https://chatgpt-i18n.vercel.app/</a>
I’m always wary of automated translation, because in the general case you need a native speaker who understands the specific application context, in order to end up with a truly fitting and idiomatic translation. However, with ChatGPT there is at least some room for improvement over traditional automated translation, in that you could explain the application context to ChatGPT, which presumably would increase the likelihood of it producing a fitting translation. Of course, a translation tool using that approach would have to be based on an input format that, in addition to the text to be translated, provides a description of the application context in which it occurs. This is something a human translator typically needs as well when they don’t have access to the application itself.
I wrote a JS plugin over a decade ago that would scan your page for strings, use google's free translate API to translate it to the target language, and save the translations to a local xx.yml file in the locales directory. It was designed for rails, since I needed to pick something for the backend local file caching, but I could rewrite it for other backends in an hour.<p>I would browse our sites in french, spanish, and english, and then we just had a fluent expert flip through the generated yml files and make any tweaks they felt were necessary. The translation wasn't perfect, but it was pretty good, and they were table to do a whole site translation in less than an hour and feel confident they got everything.<p>It died from config rot, but it worked great until google changed some APIs. Ah, I just looked it up - 13 years ago!!
When I tried to translate this<p><pre><code> {
"title":"hello"
}
</code></pre>
I got<p><pre><code> {
"título": "hola"
}
</code></pre>
Why did it change the key?
> I wanted to use a more efficient and accurate translation tool<p>ChatGPT more accurate than Google Translate? I find that hard to believe. The obvious solution to make the process more efficient would be to use the Translate API. Seems like something you could script in a couple of hours, tops.
While it's a pretty cool use of ChatGPT, there are lots of options for translating json locale files. I recently wrote a post about doing it in React Native projects, but the same concept could be applied to any framework, really. The npm package "json-autotranslate" can be installed as a CLI tool, and can hook into a fair few different translation services. I generally find using the DeepL-free provider works extremely well. <a href="https://dev.to/mikehamilton00/react-native-expo-automatic-machine-translation-5ao" rel="nofollow">https://dev.to/mikehamilton00/react-native-expo-automatic-ma...</a>
Sometimes back I looked into and compared Google translate and chat GPT for this. Seems like Google translate is superior for the translating English into languages that I knew (Spanish and Hindi).<p>I ended up writing a small GitHub Action to automate this for hobby apps. <a href="https://github.com/ashishb/android-auto-translate">https://github.com/ashishb/android-auto-translate</a>
Hey, we just working in ChatGPT or other openAI models integration to Tolgee localization platform. Cool thing about this is that we have lot of context about the strings, since our integrations (including in-context localization). That way we can provide super accurate results. Stay tuned. <a href="https://tolgee.io" rel="nofollow">https://tolgee.io</a>
Cool idea. I've used Github Copilot to do a lot of translations but this looks much easier.<p>It's a pity Vercel has a cli login wall to even run the app. I tried the Github option and it didn't work. My first impression of Vercel is not good. Unfortunately the demo app threw some errors in the console on file I tested with.
Interesting.<p>I've used json-translator in the past.<p>It supports Google Translate, Bing Microsoft Translate, Libre Translate, and Argos Translate.<p><a href="https://github.com/mololab/json-translator">https://github.com/mololab/json-translator</a>
The official sponsor of i18next actually offer json translation for free here:<p><a href="https://translate.i18next.com" rel="nofollow">https://translate.i18next.com</a>