i2 Notebook SDK
Search results for

    Show/hide table of contents

    The data formatter and bidirectional text

    The i2 Notebook web client supports displaying text and data in different languages and according to the rules of different locales. The i2 Notebook Web API includes functionality to assist with maintaining the flow of the user interface and the direction of the text it contains; and with keeping consistency between your plug-ins and the application itself.

    Formatting data for display

    In your plug-in code, you might need to format record data according to formatting and translation locales (to comply with pluralization rules, for example) so that it is always displayed appropriately.

    The API provides the IFormatter interface, whose methods can help you with the formatting process. Using the API is always better than manipulating values directly.

    Maintaining user interface flow and text direction

    The i2 Notebook application supports languages that use right-to-left writing systems, such as Arabic and Hebrew. The API provides the ILocale interface, whose properties provide information about the application's user interface flow direction, the user's chosen text direction, and precise locales for formatting and translation.

    Controlling bidirectional text using Unicode

    Sometimes, a piece of text in a language that uses a right-to-left script can include numbers or text in Latin or another script that flows from left to right. In order for the application to display text correctly in such circumstances, you need to tell it what direction applies to different parts of the text.

    The i2 Notebook Web API provides the wrapForBidi() method to address this issue. This method uses invisible Unicode characters to "wrap" sections of text so that the application knows how to display them correctly. The Angular, React, and Vue tutorials address the issue of bidirectionality, and demonstrate using wrapForBidi() to control it.

    In this article
    Back to top © N. Harris Computer Corporation