mirror of
https://github.com/svemagie/indiekit-endpoint-microsub.git
synced 2026-04-02 15:35:00 +02:00
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:
9
index.js
9
index.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user