- Book Versions Multilingual Feature Design
-
- 1. Class Structure
-
-
- New Translation Class(es)
``` BookVersions.Code.PageTitleTranslationClass Properties:
- language (String, required) - Language code
- title (String) - Translated page title
- status (StaticList) - Translation status ("not_translated", "in_progress", "translated")
Attached to: WebHome pages for unversioned and in content sub-pages for versioned ``` ``` BookVersions.Code.MultilingualClass Properties:
- enabled (Boolean, required) - Enable disable feature
- supportedLanguages (Multivalued input field) - List of supported languages
Attached to: WebHome of new Languages space ```
-
- 2. Document Structure
-
-
- Unversioned Page
``` MyBook/Page1/ ├── WebHome ├── BookPageClass (unversioned: true) ├── PageTitleTranslationClass objects (for title translations) └── Content with translation macros ```
-
-
- Versioned Page
``` MyBook/Page1/ ├── WebHome │ ├── BookPageClass (unversioned: false) ├── v1.0/ (hidden) │ ├── BookVersionedContentClass │ ├── PageTitleTranslationClass objects │ └── Content with translation macros └── v2.0/ (hidden) ├── BookVersionedContentClass ├── PageTitleTranslationClass objects └── Content with translation macros ```
-
-
- Languages Space
``` MyBook ├── Page1 │ ├── v1.0/ (hidden) │ │ ├── PageTitleTranslationClass objects │ │ └── Content with translation macros │ ├── v2.0/ (hidden) │ │ ├── PageTitleTranslationClass objects │ │ └── Content with translation macros ├── Versions ├── Variants ├── Libraries └── Languages └── WebHome └── MultilingualClass object ```
-
-
- Templates
- New templates if multilingual for versioned and unversioned that puts the content inside a macro for default language (facilitates mirgration)
-
- 3. Translation Macro
``` Name: contentTranslation Parameters:
- language (required) - Target language code
Usage: contentTranslation language="ja" Japanese content here /contentTranslation ```
-
- 4. Content Inheritance Rules
-
-
- Title Translation
1. Look for PageTitleTranslationClass object in requested language 2. If not found, check version inheritance chain 3. Fall back to default language if no translation found
-
-
- Content Translation
For versioned pages: 1. Check current version's hidden page for translation 2. If not found, follow version inheritance chain 3. Fall back to default language content
For unversioned pages: 1. Check WebHome page for translation 2. Fall back to default language content
-
- 5. UI Components
-
-
- Versions Administration
- Language configuration section in dedicated Language Admin space
- Global translation status overview
- Add/remove languages
-
-
- Content Editor
- Language selector showing available languages or available translations
- Translation status indicator
- Users will add the translation macros manually
-
-
- Navigation
- Language selector in book navigation menu
- Visual indicators for untranslated content
- Language-aware breadcrumbs / URLs - computed title - picks title from object solves this for both breadcrubs and URLs
|