Documentation

LocaleInfoRUS extends LocaleInfo
in package

Locale info for Russian Federation; see {@see LocaleInfo}

Table of Contents

Properties

$auto  : mixed
$currency_decimal  : mixed
$currency_iso  : mixed
$currency_name  : mixed
$currency_symbol  : mixed
$decimal_seperator  : mixed
$group_seperator  : mixed
$line1  : mixed
$line2  : mixed
$longdate  : mixed
$phone_code  : mixed
$postcode_name  : mixed
$shortdate  : mixed
$state_list  : mixed
$state_name  : mixed
$time  : mixed
$town_name  : mixed

Methods

auto()  : LocaleInfo
Automatically chooses a locale and returns it
get()  : LocaleInfo
Returns the LocaleInfo class for the specified country code.
getCurrencyISO()  : string
Return currency ISO code, eg 'AUD'
getCurrencyName()  : string
The name of the currency, e.g. 'Dollar' for $
getParameters()  : mixed
Return the raw parameters of this locale
getPhoneCode()  : string
Return phone code, eg '213'
getStateList()  : array<string|int, mixed>
Gets a list of states
getStateName()  : string
Get the name of a given state by looking it up in the states list
longdate()  : string
Formats dates in a long format
moneyFormat()  : string
Formats currency values, similar to the interal {@see number_format} function
nonNumericStates()  : array<string|int, mixed>
Organises the state list so that it doesn't have numeric keys.
numberFormat()  : string
Formats numbers, like the interal {@see number_format} function
outputAddressField()  : string
Generates a single address field for the current locale
outputAddressFields()  : string
Generates the address fields for the current locale
outputAddressText()  : string
Returns a string which is a formatted version of the address specified using the provided data.
shortdate()  : string
Formats dates in a short format
stateValues()  : array<string|int, mixed>
Extracts only the enterable values from the state list
time()  : string
Formats times
validateAddress()  : void
Validate address fields

Properties

$currency_decimal

protected mixed $currency_decimal = 2

$currency_name

protected mixed $currency_name = 'Dollar'

$currency_symbol

protected mixed $currency_symbol = '$'

$decimal_seperator

protected mixed $decimal_seperator = '.'

$group_seperator

protected mixed $group_seperator = ','

$longdate

protected mixed $longdate = 'D jS M Y'

$postcode_name

protected mixed $postcode_name = 'Postcode'

$state_list

protected mixed $state_list = ['AD' => 'Adygeya, Respublika', 'AL' => 'Altay, Respublika', 'ALT' => 'Altayskiy kray', 'AMU' => 'Amurskaya oblast\'', 'ARK' => 'Arkhangel\'skaya oblast,', 'AST' => 'Astrakhanskaya oblast\'', 'BA' => 'Bashkortostan, Respublika', 'BEL' => 'Belgorodskaya oblast\'', 'BRY' => 'Bryanskaya oblast\'', 'BU' => 'Buryatiya, Respublika', 'CE' => 'Chechenskaya Respublika', 'CHE' => 'Chelyabinskaya oblast\'', 'CHU' => 'Chukotskiy avtonomnyy okrug', 'CU' => 'Chuvashskaya Respublika', 'DA' => 'Dagestan, Respublika', 'IN' => 'Ingushskaya Respublika', 'IRK' => 'Irkutskaya oblast\'', 'IVA' => 'Ivanovskaya oblast\'', 'KAM' => 'Kamchatskaya oblast\'', 'KB' => 'Kabardino-Balkarskaya Respublika', 'KC' => 'Karachayevo-Cherkesskaya Respublika', 'KDA' => 'Krasnodarskiy kray', 'KEM' => 'Kemerovskaya oblast\'', 'KGD' => 'Kaliningradskaya oblast,', 'KGN' => 'Kurganskaya oblast\'', 'KHA' => 'Khabarovskiy kray', 'KHM' => 'Khanty-Mansiyskiy avtonomnyy okrug', 'KIR' => 'Kirovskaya oblast\'', 'KK' => 'Khakasiya, Respublika', 'KL' => 'Kalmykiya, Respublika', 'KLU' => 'Kaluzhskaya oblast\'', 'KO' => 'Komi, Respublika', 'KOS' => 'Kostromskaya oblast\'', 'KR' => 'Kareliya, Respublika', 'KRS' => 'Kurskaya oblast\'', 'KYA' => 'Krasnoyarskiy kray', 'LEN' => 'Leningradskaya oblast\'', 'LIP' => 'Lipetskaya oblast\'', 'MAG' => 'Magadanskaya oblast\'', 'ME' => 'Mariy El, Respublika', 'MO' => 'Mordoviya, Respublika', 'MOS' => 'Moskovskaya oblast\'', 'MOW' => 'Moskva', 'MUR' => 'Murmanskaya oblast\'', 'NEN' => 'Nenetskiy avtonomnyy okrug', 'NGR' => 'Novgorodskaya oblast\'', 'NIZ' => 'Nizhegorodskaya oblast\'', 'NVS' => 'Novosibirskaya oblast\'', 'OMS' => 'Omskaya oblast\'', 'ORE' => 'Orenburgskaya oblast\'', 'ORL' => 'Orlovskaya oblast\'', 'PER' => 'Perm', 'PNZ' => 'Penzenskaya oblast\'', 'PRI' => 'Primorskiy kray', 'PSK' => 'Pskovskaya oblast\'', 'ROS' => 'Rostovskaya oblast\'', 'RYA' => 'Ryazanskaya oblast\'', 'SA' => 'Sakha, Respublika [Yakutiya]', 'SAK' => 'Sakhalinskaya oblast\'', 'SAM' => 'Samarskaya oblast\'', 'SAR' => 'Saratovskaya oblast\'', 'SE' => 'Respublika Severnaya Osetiya-Alaniya', 'SMO' => 'Smolenskaya oblast\'', 'SPE' => 'Sankt-Peterburg', 'STA' => 'Stavropol\'skiy kray', 'SVE' => 'Sverdlovskaya oblast\'', 'TA' => 'Tatarstan, Respublika', 'TAM' => 'Tambovskaya oblast\'', 'TOM' => 'Tomskaya oblast\'', 'TUL' => 'Tul\'skaya oblast\'', 'TVE' => 'Tverskaya oblast\'', 'TY' => 'Tyva, Respublika [Tuva]', 'TYU' => 'Tyumenskaya oblast\'', 'UD' => 'Udmurtskaya Respublika', 'ULY' => 'Ul\'yanovskaya oblast\'', 'VGG' => 'Volgogradskaya oblast\'', 'VLA' => 'Vladimirskaya oblast\'', 'VLG' => 'Vologodskaya oblast\'', 'VOR' => 'Voronezhskaya oblast\'', 'YAN' => 'Yamalo-Nenetskiy avtonomnyy okrug', 'YAR' => 'Yaroslavskaya oblast\'', 'YEV' => 'Yevreyskaya avtonomnaya oblast\'', 'ZAB' => 'Zabaykal\'skiy kray']

$state_name

protected mixed $state_name = 'State/Province'

$town_name

protected mixed $town_name = 'Suburb/Town'

Methods

get()

Returns the LocaleInfo class for the specified country code.

public static get([string $code = null ]) : LocaleInfo

If no LocaleInfo can be found, a generic version is used.

Parameters
$code : string = null

3-letter country code (ISO 3166-1 alpha-3)

Return values
LocaleInfo

getCurrencyISO()

Return currency ISO code, eg 'AUD'

public getCurrencyISO() : string
Return values
string —

eg 'AUD'

getCurrencyName()

The name of the currency, e.g. 'Dollar' for $

public getCurrencyName() : string
Return values
string

getParameters()

Return the raw parameters of this locale

public getParameters() : mixed

getPhoneCode()

Return phone code, eg '213'

public getPhoneCode() : string
Return values
string —

eg '213'

getStateList()

Gets a list of states

public getStateList() : array<string|int, mixed>
Return values
array<string|int, mixed> —

For use with Fb::dropdown

getStateName()

Get the name of a given state by looking it up in the states list

public getStateName(string $val) : string
Parameters
$val : string

Values stored by the LocaleInfo::outputAddressFields dropdown field

Return values
string —

Full name of state, e.g. 'South Australia'

longdate()

Formats dates in a long format

public longdate(int $timestamp) : string
Parameters
$timestamp : int

Unix timestamp

Return values
string

moneyFormat()

Formats currency values, similar to the interal {@see number_format} function

public moneyFormat(int|float $number[, int $precision = null ]) : string
Parameters
$number : int|float

The number to format

$precision : int = null

The number of decimal places to render; if NULL then it's locale-dependent

Return values
string

nonNumericStates()

Organises the state list so that it doesn't have numeric keys.

public nonNumericStates() : array<string|int, mixed>

The state names become the form field values if state list is a numeric array. This makes it easy to configure a new locate with states/provinces/etc which don't have standard abbreviations.

E.g. ['State 1', 'State 2'] would become: ['State 1' => 'State 1', 'State 2' => 'State 2']

Return values
array<string|int, mixed>

numberFormat()

Formats numbers, like the interal {@see number_format} function

public numberFormat(int|float $number[, int $precision = 0 ]) : string
Parameters
$number : int|float

The number to format

$precision : int = 0

The number of decimal places to render

Return values
string

outputAddressField()

Generates a single address field for the current locale

public outputAddressField(string $field[, string $prefix = '' ][, bool $required = false ]) : string
Parameters
$field : string

'street', 'street2', 'town', 'state', or 'postcode'

$prefix : string = ''

Optional prefix, e.g. 'postal_'

$required : bool = false

True if the address as a whole is required, irrespective of the individual field

Return values
string

outputAddressFields()

Generates the address fields for the current locale

public outputAddressFields([string $prefix = '' ][, bool $required = false ]) : string
Parameters
$prefix : string = ''

Optional prefix, e.g. 'postal_'

$required : bool = false

True if the address as a whole is required, irrespective of individual fields

Return values
string

outputAddressText()

Returns a string which is a formatted version of the address specified using the provided data.

public outputAddressText(array<string|int, mixed>|object $data) : string

The string contains newlines which will need converting to BRs for HTML output

Parameters
$data : array<string|int, mixed>|object

A record from the database required columns: street, town, state, postcode, country

Return values
string —

Plaintext

shortdate()

Formats dates in a short format

public shortdate(int $timestamp) : string
Parameters
$timestamp : int

Unix timestamp

Return values
string

stateValues()

Extracts only the enterable values from the state list

public stateValues() : array<string|int, mixed>

This should be used for validation.

Return values
array<string|int, mixed>

time()

Formats times

public time(int $timestamp) : string
Parameters
$timestamp : int

Unix timestamp

Return values
string

validateAddress()

Validate address fields

public validateAddress(Validator $valid[, bool $required = false ]) : void
Parameters
$valid : Validator

Validator for the form being processed

$required : bool = false

Are the address fields required?

On this page

Search results