GetLocale

Description

This class is a wrapper class for the Locale subsystem and can be used to obtain locale specific information for time, date, datetime, currency, and number items. Locale is usually set within the application, so this class should only be used sparingly. Something similar to the following XML should be passed to dispatchMBAPI() when you want to call the GetLocale command:

Attributes

author
Mark Garrett
package
modernbill
subpackage
mbapi
version
0.1

Example Request

	<mbapi>
		<command><!-- None --></command>
		<showXMLHeader><!-- None --></showXMLHeader>
		<params>
			<clientID><!-- int --></clientID>
			<locale><!-- string --></locale>
			<currencyCode><!-- string --></currencyCode>
			<time><!-- int --></time>
			<timeFormat><!-- string --></timeFormat>
			<date><!-- int --></date>
			<dateFormat><!-- string --></dateFormat>
			<dateTime><!-- int --></dateTime>
			<dateTimeFormat><!-- string --></dateTimeFormat>
			<currency><!-- float --></currency>
			<number><!-- float --></number>
			<getLocaleArrayXML><!-- int --></getLocaleArrayXML>
		</params>
	</mbapi>

		

Example Response

None
		

Request Elements

mbapi
Type
None
Description
None
Children
command
Type
None
Description
None
showXMLHeader
Type
None
Description
None
params
Type
None
Description
None
Children
clientID
Type
int
Description

Use to obtain locale data for a specific client. Either this or locale needs to be set to obtain the correct locale information.

locale
Type
string
Description

Use to obtain locale data for a specific locale. Either this or clientID needs to be set to obtain the correct locale information. Use of a clientID is preferable if it is available.

currencyCode
Type
string
Description

ISO-4177 code. Use to override the default currency for the client and/or locale.

time
Type
int
Description

Unix timestamp. Returns the time formatted in the locale.

timeFormat
Type
string
Description

Format of time return - Accepts full, long, medium, short.

date
Type
int
Description

Unix timestamp. Returns the date formatted in the locale.

dateFormat
Type
string
Description

Format of date return - Accepts full, long, medium, short.

dateTime
Type
int
Description

Unix timestamp. Returns the datetime formatted in the locale.

dateTimeFormat
Type
string
Description

Format of date return - Accepts full, long, medium, short.

currency
Type
float
Description

Returns the currency formatted in the locale. Negative numbers will be enclosed in a <span class="negativenumber"></span>.

number
Type
float
Description

Returns the currency formatted in the locale. Negative numbers will be enclosed in a <span class="negativenumber"></span>.

getLocaleArrayXML
Type
int
Description

Set to 1 to Return the all the locale data as XML.

Response Elements

None