KiteViewerStrings

@Immutable
class KiteViewerStrings(val page: (number: Int, count: Int?) -> String = { number, count -> if (count == null) "Page $number" else "Page $number of $count" }, val previousPage: String = "Previous page", val nextPage: String = "Next page", val highlightColor: (number: Int, count: Int) -> String = { number, count -> "Highlight colour $number of $count" }, val formField: String = "Form field", val link: String = "Link", val openLinkQuestion: String = "Open this link?", val openLink: String = "Open", val cancel: String = "Cancel", val markupErrors: (first: KiteXmlError, count: Int) -> String = { first, count -> "This chapter is not well-formed XML. Line ${first.line}: ${first.message}." + if (count > 1) " ${count - 1} more errors follow." else "" })(source)

The words that KiteDocView and its widgets give a screen reader. The defaults are English; provide a translated set through LocalKiteViewerStrings:

CompositionLocalProvider(
LocalKiteViewerStrings provides KiteViewerStrings(
page = { number, count -> if (count == null) "Seite $number" else "Seite $number von $count" },
previousPage = "Vorherige Seite",
nextPage = "Nächste Seite",
),
) {
KiteDocView(state)
}

Parameters

page

the name of a page from its number, starting at 1, and the page count. The count is null while a book still lays out and does not know it.

previousPage

the name of the button that turns back.

nextPage

the name of the button that turns forward.

highlightColor

the name of a colour of the selection menu from its place, starting at 1, and the count of colours.

formField

the name of the input of a form field that has no tooltip and no name.

link

the name of a link that has no text on the page and no address.

openLinkQuestion

the question the viewer asks before it opens an address outside the document, such as a web page (#519).

openLink

the button that opens that address.

cancel

the button that closes the question and opens nothing.

markupErrors

the notice on the first page of a chapter whose markup is not well-formed XML, from the first error and the count of errors (#517).

Constructors

Link copied to clipboard
constructor(page: (number: Int, count: Int?) -> String = { number, count -> if (count == null) "Page $number" else "Page $number of $count" }, previousPage: String = "Previous page", nextPage: String = "Next page", highlightColor: (number: Int, count: Int) -> String = { number, count -> "Highlight colour $number of $count" }, formField: String = "Form field", link: String = "Link", openLinkQuestion: String = "Open this link?", openLink: String = "Open", cancel: String = "Cancel", markupErrors: (first: KiteXmlError, count: Int) -> String = { first, count -> "This chapter is not well-formed XML. Line ${first.line}: ${first.message}." + if (count > 1) " ${count - 1} more errors follow." else "" })

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val highlightColor: (number: Int, count: Int) -> String
Link copied to clipboard
Link copied to clipboard
val markupErrors: (first: KiteXmlError, count: Int) -> String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val page: (number: Int, count: Int?) -> String
Link copied to clipboard