feat: add i18n support for 14 languages

Add translations for de, es, es-419, fr, hi, id, it, nl, pl, pt, pt-BR, sr, sv, zh-Hans-CN
to match upstream Indiekit's supported locales. Also add missing localesDirectory getter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ricardo
2026-02-13 22:33:25 +01:00
parent e5ffc5b8a1
commit 9bcfac5d8a
16 changed files with 1466 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import path from "node:path";
import { fileURLToPath } from "node:url";
import express from "express";
@@ -29,6 +30,14 @@ export default class MicrosubEndpoint {
this.mountPath = this.options.mountPath;
}
/**
* Locales directory path
* @returns {string} Path to locales directory
*/
get localesDirectory() {
return path.join(path.dirname(fileURLToPath(import.meta.url)), "locales");
}
/**
* Navigation items for Indiekit admin
* @returns {object} Navigation item configuration