This project is a tiny Express + i18next example that shows how a Node.js app can keep its copy in JSON locale files and let Yesglot manage translation updates through Git.
The app itself is intentionally small:
- one JSON API endpoint:
GET /api/holiday-check - one minimal HTML page:
GET / - locale files in
locales/<language>/translation.json - holiday data from the public Nager.Date API
- styling built with
Tailwind CSSanddaisyUI
- server-side localization in a Node.js app
- a language switcher for the UI
- browser-based "today" detection
- country selection that is separate from the UI language
- localized API responses for titles, labels, status text, and countdown strings
That separation is the main localization point:
- the UI can be French
- the selected holiday country can be Japan
- the holiday name can still come from the upstream holiday source
- Node.js 20+
- npm
npm installnpm run devIf you are editing the daisyUI/Tailwind styles, run this in a second terminal:
npm run dev:cssOpen:
http://localhost:4321
npm testExample request:
GET /api/holiday-check?country=NL&date=2026-12-25&lang=fr
Example response:
{
"requested": {
"country": "NL",
"date": "2026-12-25",
"language": "fr"
},
"country": {
"code": "NL",
"name": "Pays-Bas"
},
"selectedDate": {
"iso": "2026-12-25",
"display": "25 décembre 2026"
},
"isHoliday": true,
"status": {
"kind": "holiday",
"badge": "Férié",
"title": "Aujourd’hui est un jour férié",
"body": "Noël figure au calendrier en Pays-Bas aujourd’hui."
}
}src/
config.js
holiday-service.js
i18n.js
render-page.js
server.js
styles.css
public/
app.js
output.css
locales/
en/translation.json
fr/translation.json
de/translation.json
nl/translation.json
tr/translation.json
yesglot.toml
This repo stores all app copy in regular JSON files under locales/. That means the workflow is straightforward:
- Update the English source file:
locales/en/translation.json - Commit and push your change
- Let Yesglot open a PR with translated updates
- Review the PR and merge it
The included yesglot.toml points at the source and target locale files so the repo is ready to use as a Yesglot example.