I18n Code - Harness AI to directly translate JSON files and Markdown blogs. Say goodbye to tedious format adjustments and hello to more localized translation results.
Localize JSON & Markdown with AI: Fast, Easy, Accurate
Having worked on several multi-language projects, I've truly felt the pain of updating and managing multi-language files.
For Next.js projects, we typically manage multi-language content with JSON files, such as en.json, ru.json, ja.json, and so on. The more languages we support, the more JSON files we accumulate.
Previously, I used GPT to translate these JSON files. It worked well when there were only a few files, but as the number grew, GPT's length limitations became a problem. If I asked it to translate en.json into ru.json, ja.json, and so on consecutively, it would eventually forget the original content of en.json and start fabricating translations. Having to include the original en.json in every translation session was also cumbersome and limited by the number of rounds of conversation.
Occasionally, when adding new pages meant updating en.json and then re-translating its content, the process was quite painful. That's when I decided to create a tool, where you could simply paste JSON content, and it would translate directly, with JSON formatting included, making it visually comfortable.
Moreover, the underlying implementation doesn't translate the entire JSON at once but breaks it down for translation, so there's no need to worry about the length of a single JSON file.
For those interested, please try out our JSON translator: https://i18ncode.com
Markdown files present similar challenges, and the issue of length is even more pronounced. Whether using GPT or machine translation, the results can be off, especially when dealing with long Markdown texts. Machine translations are even more problematic, as they often fail to recognize Markdown formatting, leading to errors in translating to less common languages.
The Markdown translator(https://www.i18ncode.com/en/markdown) I've developed takes length into account. Although there's a suggested length indicator, it's just that—a suggestion. You can still translate content that exceeds the suggested length. That suggested length is the average Markdown length I've personally found to be sufficient for most use cases. It also recognizes common Markdown symbols, so translation results generally won't go off the rails. If they do, please provide feedback, and I'll make improvements.
The GPT we use also incorporates localization requirements, striving to achieve more excellent localization results than standard machine translations.
Lastly, considering the potential issues users of this tool might face, I'll also write some blog posts, such as how to easily implement i18n internationalization in Next.js project App directories: https://www.i18ncode.com/en/blog/how-nextjs-app-simply-make-i18n. I might also publish guides on how to structure multi-language support in Next project App directories. When researching this, I found that most mature solutions currently only support Pages structures, and it took quite a bit of time to implement for App directories.
I hope that the tools and experiences I've summarized from my own pitfalls will be helpful to everyone. Thank you!