[data-reveal]{opacity:1!important;transform:none!important}
Installation
Translation

Installation

Add the Lang module to an AntelopeJS DMS project and open it in the dashboard.

The Lang module runs inside a project that already loads @antelopejs/dms. It depends only on the published @antelopejs/interface-dms, @antelopejs/interface-api and @antelopejs/interface-core interfaces, which the DMS provides.

Requirements

PackageVersion
@antelopejs/dms>=0.9.0 <1.0.0
@antelopejs/interface-dms>=0.7.0 <1.0.0
@antelopejs/dms-frontend (the renderer)0.6
Lang 0.2 runs on DMS 0.9 and renderer 0.6 only. On an older DMS, stay on Lang 0.1 until you upgrade the backend, interface and renderer together. See DMS installation for the toolchain and Troubleshooting for dependency and frontend integration errors.

Add it to a project

Add the module

Run the AntelopeJS CLI from your project root:

Terminal
ajs project modules add @antelopejs/dms-lang

The command adds a dms-lang entry to antelope.config.ts.

Allow editing

The module starts read-only. Set editable: true on the process that should create workspaces and write translations:

antelope.config.ts
export default defineConfig({
  name: "my-project",
  modules: {
    "dms-lang": {
      source: { type: "package", package: "@antelopejs/dms-lang", version: "^0.2.0" },
      config: {
        editable: true,
      },
    },
    // dms, api, mongodb, ...
  },
});

Mark your app's translations as writable

The Project files workspace edits the locale files of your own frontend module. Flag that module with dmsI18nAppLayer when you register it:

src/index.ts
import path from "node:path";
import { AddFrontendModule } from "@antelopejs/interface-dms/page";

export async function construct(): Promise<void> {
  await AddFrontendModule({
    name: "my-project-frontend-vue",
    sourcePath: path.join(__dirname, "../frontend-vue"),
    renderer: { name: "vue", version: "3" },
    configKey: "myProject",
    priority: 1,
    options: { dmsI18nAppLayer: true },
  });
}

Every JSON file named <name>-<xx-XX>.json in the module's discovered locale directories becomes a project file: app-en-GB.json, or one file per domain such as crm-en-GB.json and team-en-GB.json. Lang scans i18n/locales recursively, or layers/*/i18n/locales instead when a layers directory exists. The app- prefix is a convention, not a requirement. See Frontend module options for discovery rules and Project files for write routing.

Restart and open the module

Restart the backend and the frontend dev server. The module appears under Modules › Translations, at /modules/lang/overview.

No frontend build step is needed for the locale files: the module discovers them through the registered frontend modules, follows modules registered or removed after it started (within a couple of seconds), and picks up file changes on the next read.
The pages render on the server: the frontend server reads the workspace list and the translations with the page, so the matrix and the queue arrive filled. A page opened without ?workspace= is redirected on the server to the workspace you used last, or to the project files.

Try it in the playground

The repository ships a playground with editing on and a writable app layer:

Terminal
pnpm install
pnpm dev            # backend on http://localhost:5010
pnpm frontend:dev   # dashboard on http://localhost:3001

The playground connects to MongoDB at mongodb://localhost:27017; set MONGO_URL to use another instance. On first start, the dashboard opens the DMS onboarding to create the owner account.