Bona iqiniso is designed to handle multilingual text translations. The system allows for the creation and management of text references and their corresponding translations in various languages. This system facilitates the retrieval of text in a specified language, returning a default message if the language is not available.
Entities
Entity: V3BiFreeTextBase
| Field | Description | Data Type | Validation Rules |
|---|---|---|---|
| reference | The unique identifier for the free text | string | Must be a non-empty string; Must be unique across all instances |
| translations | A list of translations associated with the reference | array of V3BiTranslationBase | Must contain at least one translation; Each translation must adhere to the V3BiTranslationBase structure |
Actions:
| Action | Description | Effects |
|---|---|---|
| Constructor(reference: string, translations: V3BiTranslationBase[]) | Initializes a new instance with a reference and translations | Creates a new free text base with the given reference and translations. Translations may be an empty array. |
| getFreeText(language: string) : string | Retrieves the translation text for the specified language | Returns the text in the specified language or ‘unknown language’ if not found |