OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.TranslationAdminSession
Implementsosid.OsidSession
Description

This session defines methods to translate and format text between a source and target locale.

MethodgetSourceLanguageType
Description

Gets the source language used in this session.

Returnosid.type.Typethe source language
CompliancemandatoryThis method must be implemented.
MethodgetSourceScriptType
Description

Gets the source script used in this session.

Returnosid.type.Typethe source script
CompliancemandatoryThis method must be implemented.
MethodgetTargetLanguageType
Description

Gets the target language used in this session.

Returnosid.type.Typethe target language
CompliancemandatoryThis method must be implemented.
MethodgetTargetScriptType
Description

Gets the target script used in this session.

Returnosid.type.Typethe target script
CompliancemandatoryThis method must be implemented.
MethodcanUpdateTranslation
Description

Tests if this user can update localization strings. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.

Returnboolean false if changing translation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaddTranslation
Description

Adds or updates a string translation.

ParametersstringsourceTextthe source string
stringtargetTextthe translated string
ErrorsNULL_ARGUMENT sourceText or targetText is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodremoveTranslation
Description

Removes a translation.

ParametersstringsourceTextthe source string
ErrorsNULL_ARGUMENT sourceText is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.