OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.LocaleManager
Implementsosid.OsidManager
osid.locale.LocaleProfile
Description

The locale manager provides access to locale sessions and provides interoperability tests for various aspects of this service. The sessions included in this manager are:

  • TranslationSession: a session translate strings
  • TranslationAdminSession: a session to update the string translations for a locale
  • NumericFormattingSession: a session for formatting and parsing numbers
  • CalendarFormattingSession: a session for formatting and parsing dates and times
  • CurrencyFormattingSession : a session for formatting and parsing currency amounts
  • CoordinateFormattingSession: a session for formatting and parsing coordinates
  • UnitConversionSession: a session to convert measurement units
  • CurrencyConversionSession: a session to convert currency
  • CalendarConversionSession: a session to convert dates across calendars
  • CoordinateConversionSession: a session to convert coordinate systems
  • SpatialUnitConversionSession: a session to convert spatial units
  • FormatConversionSession: a session to convert text formats
  • CalendarInfoSession: a session for examining calendaring and time systems
MethodgetTranslationSession
Description

Gets an OsidSession associated with the language translation service.

Returnosid.locale.TranslationSessiona TranslationSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsTranslation() is false
ComplianceoptionalThis method must be implemented if supportsTranslation() is true.
MethodgetTranslationSessionForType
Description

Gets an OsidSession associated with the language translation service and the given language and script types.

Parametersosid.type.TypesourceLanguageTypethe type of the source language
osid.type.TypesourceScriptTypethe type of the source script
osid.type.TypetargetLanguageTypethe type of the target language
osid.type.TypetargetScriptTypethe type of the target script
Returnosid.locale.TranslationSessiona TranslationSession
ErrorsNULL_ARGUMENT sourceLanguageType, sourceScriptType, targetLanguageType or targetScriptType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsTranslation() or supportsVisibleFederation() is false
UNSUPPORTED supportsLanguageTypesForTranslation(sourceLanguageType, sourceScriptType, targetLanguageType, targetScriptType) is false
ComplianceoptionalThis method must be implemented if supportsTranslation() and supportsVisibleFederation() are true.
MethodgetTranslationAdminSession
Description

Gets a language translation administration service for updating a locale dictionary.

Returnosid.locale.TranslationAdminSessiona TranslationAdminSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsTranslationAdmin() is false
ComplianceoptionalThis method must be implemented if supportsTranslationAdmin() is true.
MethodgetTranslationAdminSessionForType
Description

Gets a language trabslation administration service for updating a locale dictionary using the given language and script types.

Parametersosid.type.TypesourceLanguageTypethe type of the source language
osid.type.TypesourceScriptTypethe type of the source script
osid.type.TypetargetLanguageTypethe type of the target language
osid.type.TypetargetScriptTypethe type of the target script
Returnosid.locale.TranslationAdminSessiona TranslationAdminSession
ErrorsNULL_ARGUMENT sourceLanguageType, sourceScriptType, targetLanguageType or targetScriptType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsTranslationAdmin() or supportsVisibleFederation() is false
UNSUPPORTED supportsLanguageTypesForTranslation(sourceLanguageType, sourceScriptType, targetLanguageType, targetScriptType) is false
ComplianceoptionalThis method must be implemented if supportsTranslationAdmin() and supportsVisibleFederation() are true.
MethodgetNumericFormattingSession
Description

Gets an OsidSession associated with the numeric formatting service.

Returnosid.locale.NumericFormattingSessiona NumericFormattingSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsNumericFormatting() is false
ComplianceoptionalThis method must be implemented if supportsNumericFormatting() is true.
MethodgetNumericFormattingSessionForType
Description

Gets an OsidSession associated with the numeric formatting service and the given numeric format type.

Parametersosid.type.TypenumericFormatTypethe type of the numeric format
Returnosid.locale.NumericFormattingSessiona NumericFormattingSession
ErrorsNULL_ARGUMENT numericFormatType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsNumericFormatting() or supportsVisibleFederation() is false
UNSUPPORTED supportsNumericFormatType(numericFormatType) is false
ComplianceoptionalThis method must be implemented if supportsNumericFormatting() and supportsVisibleFederation() are true.
MethodgetCalendarFormattingSession
Description

Gets an OsidSession associated with the calendar formatting service.

Returnosid.locale.CalendarFormattingSessiona CalendarFormattingSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCalendarFormatting() is false
ComplianceoptionalThis method must be implemented if supportsCalendarFormatting() is true.
MethodgetCalendarFormattingSessionForType
Description

Gets an OsidSession associated with the calendar formatting service and the given calendar and time types.

Parametersosid.type.TypecalendarTypethe type of the calendar
osid.type.TypecalendarFormatTypethe type of the calendar format
osid.type.TypetimeTypethe type of the time system
osid.type.TypetimeFormatTypethe type of the time format
Returnosid.locale.CalendarFormattingSessiona CalendarFormattingSession
ErrorsNULL_ARGUMENT calendarType, calendarFormatType, timeType or timeFormatType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCalendarFormatting() or supportsVisibleFederation() is false
UNSUPPORTED supportsCalendarTypesForFormattinge(calendarType, calendarFormatType, timeType, timeFormatType) is false
ComplianceoptionalThis method must be implemented if supportsCalendarFormatting() and supportsVisibleFederation() are true.
MethodgetCurrencyFormattingSession
Description

Gets an OsidSession associated with the currency formatting service.

Returnosid.locale.CurrencyFormattingSessiona CurrencyFormattingSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCurrencyFormatting() is false
ComplianceoptionalThis method must be implemented if supportsCurrencyFormatting() is true.
MethodgetCurrencyFormattingSessionForType
Description

Gets an OsidSession associated with the currency formatting service and the given currency and numeric format types.

Parametersosid.type.TypecurrencyTypethe type of the currency
osid.type.TypenumericFormatTypethe type of the numeric format
Returnosid.locale.CurrencyFormattingSessiona CurrencyFormattingSession
ErrorsNULL_ARGUMENT currencyType or numericFormatType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCurrencyFormatting() or supportsVisibleFederation() is false
UNSUPPORTED supportsCurrencyTypesForFomatting(currencyType, numericFormatType) is false
ComplianceoptionalThis method must be implemented if supportsCurrencyFormatting() and supportsVisibleFederation() are true.
MethodgetCoordinateFormattingSession
Description

Gets an OsidSession associated with the coordinate formatting service.

Returnosid.locale.CoordinateFormattingSessiona CoordinateFormattingSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCoordinateFormatting() is false
ComplianceoptionalThis method must be implemented if supportsCoordinateFormatting() is true.
MethodgetCoordinateFormattingSessionForType
Description

Gets an OsidSession associated with the coordinate formatting service and the given coordinate and format types.

Parametersosid.type.TypecoordinateTypethe type of the coordinate
osid.type.TypecoordinateFormatTypethe type of the coordinate format
Returnosid.locale.CoordinateFormattingSessiona CoordinateFormattingSession
ErrorsNULL_ARGUMENT coordinateType or coordinateFormatType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCoordinateFormatting() or supportsVisibleFederation() is false
UNSUPPORTED supportsCoordinateTypesForFomatting(coordinateType, coordinateFormatType) is false
ComplianceoptionalThis method must be implemented if supportsCoordinateFormatting() and supportsVisibleFederation() are true.
MethodgetUnitConversionSession
Description

Gets a unit conversion session.

Returnosid.locale.UnitConversionSessiona UnitConversionSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsUnitConversion() is false
ComplianceoptionalThis method must be implemented if supportsUnitConversion() is true.
MethodgetCurrencyConversionSession
Description

Gets a currency conversion session.

Returnosid.locale.CurrencyConversionSessiona CurrencyConversionSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCurrencyConversion() is false
ComplianceoptionalThis method must be implemented if supportsCurrencyConversion() is true.
MethodgetCurrencyConversionSessionForType
Description

Gets an OsidSession associated with the currency conversion service and the given currency types.

Parametersosid.type.TypesourceCurrencyTypethe type of the source currency
osid.type.TypetargetCurrencyTypethe type of the target currency
Returnosid.locale.CurrencyConversionSessiona CurrencyConversionSession
ErrorsNULL_ARGUMENT sourceCurrencyType or targetCurrencyType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCurrencyConversion() or supportsVisibleFederation() is false
UNSUPPORTED supportsCurrencyTypesForConversion(sourceCurrencyType, targetCurrencyType) is false
ComplianceoptionalThis method must be implemented if supportsCurrencyConversion() and supportsVisibleFederation() are true.
MethodgetCalendarConversionSession
Description

Gets a calendar conversion session.

Returnosid.locale.CalendarConversionSessiona CalendarConversionSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCalendarConversion() is false
ComplianceoptionalThis method must be implemented if supportsCalendarConversion() is true.
MethodgetCalendarConversionSessionForType
Description

Gets an OsidSession associated with the calendar conversion service and the given calendar types.

Parametersosid.type.TypesourceCalendarTypethe type of the source calendar
osid.type.TypesourceTimeTypethe type of the source time
osid.type.TypetargetCalendarTypethe type of the target calendar
osid.type.TypetargetTimeTypethe type of the target time
Returnosid.locale.CalendarConversionSessiona CalendarConversionSession
ErrorsNULL_ARGUMENT sourceCalendarType, sourceTimeType, targetCalendarType or targetTimeType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCalendarConversion() or supportsVisibleFederation() is false
UNSUPPORTED supportsCalendarTypesForConversion(sourceCalendarType, targetCalendarType) or supportsTimeTypesForConversion(sourceTimeType, targetTimeType) is false
ComplianceoptionalThis method must be implemented if supportsCalendarConversion() and supportsVisibleFederation() are true.
MethodgetCoordinateConversionSession
Description

Gets a coordinate conversion session.

Returnosid.locale.CoordinateConversionSessiona CoordinateConversionSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCoordinateConversion() is false
ComplianceoptionalThis method must be implemented if supportsCoordinateConversion() is true.
MethodgetCoordinateConversionSessionForType
Description

Gets an OsidSession associated with the coordinate conversion service and the given coordinate types.

Parametersosid.type.TypesourceCoordinateTypethe type of the source coordinate
osid.type.TypetargetCoordinateTypethe type of the target coordinate
Returnosid.locale.CoordinateConversionSessiona CoordinateConversionSession
ErrorsNULL_ARGUMENT sourceCoordinateType or targetCoordinateType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCoordinateConversion() or supportsVisibleFederation() is false
UNSUPPORTED supportsCoordinateRecordTypesForConversion(sourceCoordinateType, targetCoordinateType) is false
ComplianceoptionalThis method must be implemented if supportsCoordinateConversion() and supportsVisibleFederation() are true.
MethodgetSpatialUnitConversionSession
Description

Gets a spatial unit conversion session.

Returnosid.locale.SpatialUnitConversionSessiona SpatialUnitConversionSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsSpatialUnitConversion() is false
ComplianceoptionalThis method must be implemented if supportsSpatialUnitConversion() is true.
MethodgetSpatialUnitConversionSessionForType
Description

Gets an OsidSession associated with the spatial unit conversion service and the given spatial unit record types.

Parametersosid.type.TypesourceSpatialUnitRecordTypethe type of the source spatial unit record
osid.type.TypetargetSpatialUnitRecordTypethe type of the target spatial unit record
Returnosid.locale.SpatialUnitConversionSessiona SpatialUnitConversionSession
ErrorsNULL_ARGUMENT sourceSpatialUnitRecordType or targetSpatialUnitRecordType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsSpatialUnitConversion() or supportsVisibleFederation() is false
UNSUPPORTED supportsSpatialUnitRecordTypesForConversion(sourceSpatialUnitRecordType, targetSpatialUnitRecordType) is false
ComplianceoptionalThis method must be implemented if supportsSpatialUnitConversion() and supportsVisibleFederation() are true.
MethodgetFormatConversionSession
Description

Gets a text format conversion session.

Returnosid.locale.FormatConversionSessiona FormatConversionSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsFormatConversion() is false
ComplianceoptionalThis method must be implemented if supportsFormatConversion() is true.
MethodgetFormatConversionSessionForType
Description

Gets an OsidSession associated with the text format conversion service and the given format types.

Parametersosid.type.TypesourceFormatTypethe type of the text format
osid.type.TypetargetFormatTypethe type of the text format
Returnosid.locale.FormatConversionSessiona FormatConversionSession
ErrorsNULL_ARGUMENT sourceFormatType or targetFormatType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsFormatConversion() or supportsVisibleFederation() is false
UNSUPPORTED supportsFormatTypesForConversion(sourceFormatType, targetFormatRecordType) is false
ComplianceoptionalThis method must be implemented if supportsFormatConversion() and supportsVisibleFederation() are true.
MethodgetCalendarInfoSession
Description

Gets a calendar informational session session.

Returnosid.locale.CalendarInfoSessiona CalendarInfoSession
ErrorsOPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCalendarInfo() is false
ComplianceoptionalThis method must be implemented if supportsCalendarInfo() is true.
MethodgetCalendarInfoSessionForType
Description

Gets an OsidSession associated with the calendar informational service and the given calendar and time types.

Parametersosid.type.TypecalendarTypethe type of the calendar
osid.type.TypetimeTypethe type of the time system
Returnosid.locale.CalendarInfoSessiona CalendarInfoSession
ErrorsNULL_ARGUMENT calendarType or timeType is null
OPERATION_FAILEDunable to complete request
UNIMPLEMENTED supportsCalendarType() or supportsVisibleFederation() is false
UNSUPPORTED supportsCalendarTimeTypes(calendarType, timeType) is false
ComplianceoptionalThis method must be implemented if supportsCalendarInfo() and supportsVisibleFederation() are true.