3.16 Language Switching
The CBA ItemBuilder supports multilingual assessment items through the LanguageSwitcher component. This component provides test-takers with a drop-down control to switch between available languages at runtime. Language switching applies to all text content that has been defined for multiple languages within the CBA ItemBuilder project (see also section 6.9 for the XLIFF-based translation workflow).
Defining Languages: To use the LanguageSwitcher, the CBA ItemBuilder project must contain text content defined for multiple languages. Languages can be managed using the XLIFF-based translation workflow described in section 6.9. At runtime, the LanguageSwitcher will list all languages for which translations have been defined in the project.
Adding a LanguageSwitcher: The LanguageSwitcher can be selected from the Palette and placed into a Panel on any page of type Simple Page. The component renders as a drop-down list showing the available languages. The property Searchable (default: false) can be set to true to allow test-takers to filter the list of available languages by typing.
Properties: The appearance of the LanguageSwitcher can be customized using the following properties in the Properties view: Font properties (Font Name, Font Size, Font Color, Bold, Italic, Underlined), layout properties (Background Color, Border Color, Border Width, Is Transparent, Alignment), and interaction properties (Cursor, Mouse Over, Is Hidden, Is Frozen, Tab Index). A Css Class Name can also be assigned for additional styling at runtime.
The language can also be changed programmatically using the changeLanguage() operator within the Finite-State Machine (see section 4.4.6).