Setting Up Internationalization

Configure AkiraDocs for multiple languages with AI-powered translation support.

Quick Setup

Basic Configuration

Add language settings to `akiradocs.config.json`:

1{
2  "localization": {
3    "defaultLocale": "en",
4    "fallbackLocale": "en",
5    "locales": [
6      {
7        "code": "en",
8        "name": "English",
9        "flag": "οΏ½πŸ‡Έ"
10      },
11      {
12        "code": "es",
13        "name": "EspaΓ±ol",
14        "flag": "πŸ‡ͺπŸ‡Έ"
15      },
16      {
17        "code": "fr",
18        "name": "Français",
19        "flag": "πŸ‡«πŸ‡·"
20      }
21    ]
22  },
23  "translation": {
24    "auto_translate": true,
25    "provider": "anthropic",
26    "targetLanguages": ["es", "fr", "de"],
27    "excludedPaths": ["_meta.json"]
28  }
29}

Directory Structure

1docs/
2β”œβ”€β”€ _contents/
3β”‚   β”œβ”€β”€ en/           # Source language
4β”‚   β”‚   └── docs/
5β”‚   β”œβ”€β”€ es/           # Spanish translation
6β”‚   β”‚   └── docs/
7β”‚   └── fr/           # French translation
8β”‚       └── docs/

Configuration Options

Language Settings

  • `defaultLocale`: Primary content language
  • `fallbackLocale`: Fallback when translation missing
  • `locales`: Available language configurations

Translation Settings

  • `auto_translate`: Enable/disable automatic translation
  • `provider`: AI translation provider
  • `targetLanguages`: Languages to translate into
  • `excludedPaths`: Files to skip during translation