News for hackers. Stuff that matters.

MarineCG40

Re: on Tuesday October 28, 2025 @07:15AM (#45731392)
I recently found a really practical way to detect and fill missing translations when working with i18next and honestly, it saves a ton of time when you have dozens of JSON files to maintain.

Step 1 — Test for missing translations You can now automatically check if you’re missing any keys in your localization files. It works with your CLI, CI/CD pipelines, or even your Jest/Vitest test suite.

Example:

npx intlayer test:i18next

It scans your codebase, compares it to your JSON files, and outputs which keys are missing or unused. Super handy before deploying or merging a PR.

Step 2 — Automatically fill missing translations

You can choose your AI provider (ChatGPT, Claude, DeepSeek, or Mistral) and use your own API key to auto-fill missing entries. Only the missing strings get translated, your existing ones stay untouched.

Example:

npx intlayer translate:i18next --provider=chatgpt

It will generate translations for missing keys in all your locales.

Step 3 — Integrate in CI/CD You can plug it into your CI to make sure no new missing keys are introduced:

npx intlayer test:i18next --ci

If missing translations are found, it can fail the pipeline or just log warnings depending on your config.

Bonus: Detect JSON changes via Git There’s even a (WIP) feature that detects which lines changed in your translation JSON using git diff, so it only re-translates what was modified.

If you’re using Next.js

TL;DR Test missing translations automatically Auto-fill missing JSON entries using AI Integrate with CI/CDWorks with i18next

Re:Next-internationalizationext vs. next-intl vs. intlayer on Tuesday September 30, 2025 @11:32PM (#45434003)
If you’ve tried adding multiple languages to a Next.js app, you know it can be a pain: * Big JSON files full of keys * Forgetting to add a translation * Config that makes no sense Here are the 3 main options people use: next-intl – super simple, small, works fine if your app isn’t too big. next-i18next – lots of features, lots of plugins, but setup is heavy and the config can get messy. Intlayer – new option, made for modern Next.js (App Router, Server Components).
Re:Stop fine-tuning LLMs for docs, use RAG on Tuesday September 16, 2025 @05:54PM (#45268672)
I keep seeing people fine-tune LLMs for use cases where they probably don’t need to. In most doc/product scenarios, you don’t need another fine-tuned model—you just need retrieval-augmented generation (RAG). Why I think RAG wins in most cases: Fine-tuning is expensive, slow, and brittle. Most use cases don’t require “teaching” the model, just giving it the right context. With RAG, you keep things fresh: update your docs → update your embeddings → done. I built a small proof-of-concept to test this: a documentation assistant where docs are chunked + embedded, user queries are matched with cosine similarity, and GPT answers with the relevant context injected. Every query is logged, which turns out to be valuable—surfacing missing docs, common user struggles, and even feature requests. Demo: https://intlayer.org/doc/chat Write-up + code: https://intlayer.org/blog/rag-powered-documentation-assistan... My question: Do you see fine-tuning + RAG coexisting for these types of tasks? Or is RAG simply the obvious solution for 80% of real-world doc/product use cases?
Reach me out if you implement it
Tell me more when you try it !

Show HN: A simpler way to manage internationalization in component-based apps

https://github.com/aymericzip/intlayer

I built this because I was frustrated with how messy translation files get as projects scale. Most i18n solutions force you to manage big JSON dictionaries, spread across multiple files, and then manually wire everything into your UI. It quickly becomes hard to keep things organized, especially in component-heavy apps. This approach is component-first i18n: translations live close to the UI...

( Read More... | 6 comments | 4 points | on HN )