There are 2 updates.
 
 
Book Versions / cid:jira-generated-image-avatar-8da58c92-b12c-404c-8916-67e3700e5e57 BVERSION-56 Open

Add multilingual feature

 
View issue   ·   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-59a83c19-32b8-4641-8e17-6f50488a708e Changes by Paul Pantiru on 16/Dec/24 07:29
 
Description: # Book Versions Multilingual Feature Design Add support for managing and displaying book content in multiple languages.

## 1
h2 . Class Structure Functionality
* Enable/disable multilingual support for a book
### * Configure supported languages per book
* Store translated page titles
* Display content in different languages using translation macros
* Support for both versioned and unversioned pages
* Maintain translation inheritance through version chain

h2. Technical Implementation
h3.
New Translation Class(es) Classes
```
BookVersions _BookVersions .Code. PageTitleTranslationClass PageTitleTransaltionClass_
Properties:
-
* language (String, required) - Language code
- * title (String) - Translated page title
- * status (StaticList) - Translation status ("not_translated", "in_progress", "translated") \{code}

Attached to: WebHome pages for unversioned and in content sub-pages for versioned
```

```
BookVersions
 _BookVersions .Code. MultilingualClass MultilingualClass_
Properties:
-
* enabled (Boolean, required) - Enable / disable feature
- * supportedLanguages ( Multivalued input field StaticList, multiple ) - List of supported languages \{code}

Attached to: WebHome of new Languages space
```

## 2
h3 . Document Structure
* New Languages space under each book containing configuration
### Unversioned Page
```
MyBook/Page1/
├──
* Translation objects stored on: ** WebHome
    ├── BookPageClass (
for unversioned : true) pages ** Version-specific content pages for versioned pages
    ├── PageTitleTranslationClass objects ( * Translation macro for title managing content translations )
    └── Content with translation macros
``` {code:java}

### Versioned Page
```
MyBook /Page1/
├──
WebHome  Page1 (versioned page)
│   ├──
BookPageClass WebHome ( unversioned: false redirect )
│   ├── v1.0/ (hidden)
│  
├── BookVersionedContentClass
│   ├── PageTitleTranslationClass PageTitleTransaltionClass objects
│  
│   └── Content with translation macros
│   └── v2.0/ (hidden)
    ├── BookVersionedContentClass
    ├── PageTitleTranslationClass PageTitleTransaltionClass objects
      └── Content with translation macros
```

### Languages Space

```
MyBook
├── Page1 
│   ├── v1.0/
UnversionedPage ( hidden unversioned page )
│  
│   ├── PageTitleTranslationClass objects
│   │  
└── Content with translation macros WebHome
│  
├── v2.0/ (hidden)
    ├── PageTitleTranslationClass PageTitleTransaltionClass objects
│  
    └── Content with translation macros
├── Versions
├── Variants
├── Libraries
└── Languages
    └── WebHome
        └── MultilingualClass object
 {code}
```

###
h3. New Templates

- New
* Modified templates if multilingual for versioned and / unversioned that puts the pages to support multilingual content inside a
* Templates should wrap content in translation
macro for default language (facilitates mirgration)

## 3 h3 . Translation Macro Administration
``` * New administration section in Languages space
Name: contentTranslation * Interface for enabling/disabling multilingual support
Parameters: * Management of supported languages
- language (required) - Target language code * Translation status overview
Usage:
{\{contentTranslation language="ja"}} h3. Navigation
Japanese * Language selector in book navigation menu
* Visual indicators for untranslated
content here
{\{/contentTranslation}}
```

## 4
h2 . Content Inheritance Rules Acceptance Criteria
* Administrator can enable/disable multilingual support for a book
### Title Translation * Administrator can configure supported languages
1. Look * Users can add translated titles for PageTitleTranslationClass object in requested language pages
2. If not found, check version * Users can add translated content using macros
* Translation
inheritance works through version chain
3. Fall * Language selection persists during navigation
* Content properly falls
back to default language if no when translation found missing


### Content
* Translation status is clearly visible
For versioned pages:
1 h2 . Check current version's hidden page for translation Additional Notes
2. If not found, follow version inheritance chain
3. Fall back to default language content


For
* Translation objects should be migrated when switching between versioned/ unversioned pages :
1. Check WebHome page for * Titles will use translation
2. Fall back to
objects when multilingual is enabled ( default language content may not use an object)

## 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 is managed through 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
Assignee: Paul Pantiru