image
Akan.js
English
Docs (V1)
image
Akan.js
You are viewing the Akan.js v1 docs.Go to the latest v2 docs
Docs (V1)
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2026 Akan.js All rights reserved.
System managed bybassman
Introduction
• Quick Start
• How it works
• Practice a Workflow
Tutorials
• Show Details
• Modifying Status
• Interact in Service
• Displaying with Slice
• UX with Pages
• Using Scalar
• Using Insight
• Relate Data
System Architecture
• Overview
• Backend System
• Frontend System
• Environment Variables
• Primitive Scalar Types
• Domain Based Modules
• CSS
Module Convention
• Overview
• model.constant.ts
• model.dictionary.ts
• model.document.ts
• model.service.ts
• model.signal.ts
• model.store.ts
• Model.Template.tsx
• Model.Unit.tsx
• Model.Util.tsx
• Model.View.tsx
• Model.Zone.tsx
Scalar Convention
• Overview
• scalar.constant.ts
• scalar.dictionary.ts
• scalar.document.ts
Introduction
• Quick Start
• How it works
• Practice a Workflow
Tutorials
• Show Details
• Modifying Status
• Interact in Service
• Displaying with Slice
• UX with Pages
• Using Scalar
• Using Insight
• Relate Data
System Architecture
• Overview
• Backend System
• Frontend System
• Environment Variables
• Primitive Scalar Types
• Domain Based Modules
• CSS
Module Convention
• Overview
• model.constant.ts
• model.dictionary.ts
• model.document.ts
• model.service.ts
• model.signal.ts
• model.store.ts
• Model.Template.tsx
• Model.Unit.tsx
• Model.Util.tsx
• Model.View.tsx
• Model.Zone.tsx
Scalar Convention
• Overview
• scalar.constant.ts
• scalar.dictionary.ts
• scalar.document.ts
Previous
model.constant.ts
Next
model.document.ts

model.dictionary.ts

The dictionary file provides internationalization (i18n) for your module. It defines translations for model names, field labels, enum values, API endpoints, error messages, and custom UI text.
🌐Frontend Usage
Multi-language UI - field labels, button text, status badges, toast messages all use dictionary translations.
⚙️Backend Usage
API documentation (Swagger/OpenAPI), error messages with proper translations, database schema descriptions.
Dictionary Builder Structure

Core Translations

Basic translations for the model itself and its fields.
methodDescriptionExample
.of((t) => ...)Define model name & description.
.model<T>((t) => ...)Define field translations.
.of((t) => ...)

Define model name & description.

.model<T>((t) => ...)

Define field translations.

2. Feature Translations
Translations for various features like insights, queries, enums, slices, and endpoints.
methodDescriptionExample
.insight<T>((t) => ...)Define insight field translations.
.query<T>((fn) => ...)Define query/filter translations.
.enum<T>(name, (t) => ...)Define enum value translations.
.slice<T>((fn) => ...)Define slice translations.
.endpoint<T>((fn) => ...)Define endpoint translations.
.insight<T>((t) => ...)

Define insight field translations.

.query<T>((fn) => ...)

Define query/filter translations.

.enum<T>(name, (t) => ...)

Define enum value translations.

.slice<T>((fn) => ...)

Define slice translations.

.endpoint<T>((fn) => ...)

Define endpoint translations.

3. Utility Translations
Translations for error messages and custom UI text.
methodDescriptionExample
.error({ ... })Define error messages.
.translate({ ... })Define custom UI translations.
.error({ ... })

Define error messages.

.translate({ ... })

Define custom UI translations.

Translation Usage

Translations defined in the dictionary are automatically used by the framework, but can also be accessed manually.
Manual Access

Dictionary Best Practices

1️⃣Consistent Naming
Field keys must exactly match the field names in your constant.ts. TypeScript will warn you about mismatches.
2️⃣Descriptive Labels
Use clear, user-friendly labels. 'Assignee' is better than 'progressBy'. 'Due Date' is better than 'due'.
3️⃣Add Descriptions
Always add .desc() for fields that might need tooltips or additional context. It helps new developers and users.
4️⃣Toast Message Convention
Use pattern: [action]Loading, [action]Success, [action]Error. Example: sellLoading, sellSuccess.
model.dictionary.ts
Core Translations
Translation Usage
Dictionary Best Practices