TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: ChatGPT-i18n – Translate websites' locale json files with AI assistance

92 pointsby basic_bananaabout 2 years ago
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:&#x2F;&#x2F;github.com&#x2F;ObservedObserver&#x2F;chatgpt-i18n">https:&#x2F;&#x2F;github.com&#x2F;ObservedObserver&#x2F;chatgpt-i18n</a><p>online app: <a href="https:&#x2F;&#x2F;chatgpt-i18n.vercel.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;chatgpt-i18n.vercel.app&#x2F;</a>

12 comments

layer8about 2 years ago
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.
评论 #35089372 未加载
knodi123about 2 years ago
I wrote a JS plugin over a decade ago that would scan your page for strings, use google&#x27;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&#x27;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!!
评论 #35096771 未加载
评论 #35083303 未加载
gl-prodabout 2 years ago
When I tried to translate this<p><pre><code> { &quot;title&quot;:&quot;hello&quot; } </code></pre> I got<p><pre><code> { &quot;título&quot;: &quot;hola&quot; } </code></pre> Why did it change the key?
评论 #35084902 未加载
评论 #35084850 未加载
SrslyJoshabout 2 years ago
&gt; 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.
评论 #35087256 未加载
评论 #35088725 未加载
评论 #35088447 未加载
评论 #35086933 未加载
评论 #35091062 未加载
评论 #35087925 未加载
gorbyparkabout 2 years ago
While it&#x27;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 &quot;json-autotranslate&quot; 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:&#x2F;&#x2F;dev.to&#x2F;mikehamilton00&#x2F;react-native-expo-automatic-machine-translation-5ao" rel="nofollow">https:&#x2F;&#x2F;dev.to&#x2F;mikehamilton00&#x2F;react-native-expo-automatic-ma...</a>
gl-prodabout 2 years ago
Missed the opportunity on having your webpage translated.
ashishbabout 2 years ago
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:&#x2F;&#x2F;github.com&#x2F;ashishb&#x2F;android-auto-translate">https:&#x2F;&#x2F;github.com&#x2F;ashishb&#x2F;android-auto-translate</a>
jancizmarabout 2 years ago
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:&#x2F;&#x2F;tolgee.io" rel="nofollow">https:&#x2F;&#x2F;tolgee.io</a>
berjinabout 2 years ago
Cool idea. I&#x27;ve used Github Copilot to do a lot of translations but this looks much easier.<p>It&#x27;s a pity Vercel has a cli login wall to even run the app. I tried the Github option and it didn&#x27;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.
评论 #35090248 未加载
评论 #35090246 未加载
EMM_386about 2 years ago
Interesting.<p>I&#x27;ve used json-translator in the past.<p>It supports Google Translate, Bing Microsoft Translate, Libre Translate, and Argos Translate.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mololab&#x2F;json-translator">https:&#x2F;&#x2F;github.com&#x2F;mololab&#x2F;json-translator</a>
rcarrabout 2 years ago
The official sponsor of i18next actually offer json translation for free here:<p><a href="https:&#x2F;&#x2F;translate.i18next.com" rel="nofollow">https:&#x2F;&#x2F;translate.i18next.com</a>
basic_bananaabout 2 years ago
This is not a self promotion post, I just want my experience working on i18n better. It is welcome to share your favorite tools that you like!