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:
<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>
None
mbapi
command
showXMLHeader
params
clientID
Use to obtain locale data for a specific client. Either this or locale needs to be set to obtain the correct locale information.
locale
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
ISO-4177 code. Use to override the default currency for the client and/or locale.
time
Unix timestamp. Returns the time formatted in the locale.
timeFormat
Format of time return - Accepts full, long, medium, short.
date
Unix timestamp. Returns the date formatted in the locale.
dateFormat
Format of date return - Accepts full, long, medium, short.
dateTime
Unix timestamp. Returns the datetime formatted in the locale.
dateTimeFormat
Format of date return - Accepts full, long, medium, short.
currency
Returns the currency formatted in the locale. Negative numbers will be enclosed in a <span class="negativenumber"></span>.
number
Returns the currency formatted in the locale. Negative numbers will be enclosed in a <span class="negativenumber"></span>.
getLocaleArrayXML
Set to 1 to Return the all the locale data as XML.