Skip to main content
Check out our example project at https://example.honyaku.dev This example project is a multilingual recipe discovery app called World Kitchen, built with Next.js and next-intl. It uses honyaku.dev to automatically translate the app into 100+ languages via a GitHub Actions workflow. You can find the full source code on GitHub.

Project Structure

Translation Source File

The source translation file uses the honyaku.dev format with text and description fields. The description provides context for the AI translator to produce more accurate translations.
messages/en.json

Honyaku Message Converter

Since next-intl expects simple string values, we need to convert the honyaku.dev format (with text and description fields) into plain strings. loadMessages extracts the text from each entry, and loadLocale handles loading the right file for each locale.
lib/honyaku.ts

i18n Setup

Routing

Defines the supported locales from @honyaku-dev/locales (which provides metadata for 100+ languages) and sets English as the default.
i18n/routing.ts

Request Configuration

Loads the appropriate translation file for each request. English messages are always spread as a fallback, so any missing translations in other languages will gracefully fall back to English.
i18n/request.ts

GitHub Actions Workflow

This workflow automatically translates the source file into all supported languages whenever messages/en.json is updated on the main branch. The targets: "all:{id}.json" pattern generates a separate file for each language.
.github/workflows/translate.yml