Lexicon

The Lexicon OSID provides a means for managing and building textual strings ( DisplayTexts) for the purposes of localizing messages, errors, or other application text that is displayed to a person. The Lexicon OSID provides an extra layer of convenience above the Locale or Dictionary OSIDs while also providing a means for variable substitution for dynamic text construction.

Texts

A Text identifies a set of textual strings that vary by language and/or format.

Idioms

Idioms come into play when managing Texts. An Idiom represents a variant of text for language and format.

Parameters

A Parameter is a substituted value. Parameter values are determined by their Syntax and supplied as arguments is retrieving the textual string in the TextSession. The order of the input arguments is constant across all Idioms in a Text although may appear in different places from one Idiom to the next.

Example (General Usage)

osid.locale.DisplayText text = TextSession.text(pangranmId, {"fox", "dog"});
print(text);

<xosid:token>=> "The quick brown fox jumps over the lazy dog."</xosid:token>
                

The language, script, and format are determined by the context of the TextSession.

Example (Management)

Text: {pangramId}
Idiom: {idiom1Id, Text=pangramId, language=English string="The quick brown %1 jumped over the lazy %2."}
Idiom: {idiom2Id, Text=pangramId, language=Esperanto string="La rapida bruna %1 susaltas la pigra %2."}
Idiom: {idiom3Id, Text=pangramId, language=English format="Reverse" string="The lazy %2 was jumped over by the quick brown %1."}
Parameter: {parameter1Id, Text=pangramId Syntax=STRING, inputPosition=1}
Parameter: {parameter2Id, Text=pangramId Syntax=STRING, inputPosition=2}
                

The means in which the Parameters are specified in an Idiom is not currently defined.

Press Cataloging

All Texts, Idioms, and Parameters may be organized into federateable OsidCatalogs called Presses.

Sub Packages

The Lexicon OSID includes a Lexicon Batch OSID for managing texts in bulk.

Package List Model