Class that loads the calendar locale.

package bbPress

 Methods

BB_Locale()

BB_Locale() 

PHP4 style constructor which calls helper methods to set up object variables

__construct() : \BB_Locale
uses
uses

Returns

\BB_Locale

Imports global locale vars set during inclusion of $locale.php.

_load_locale_data() 
access private

get_datetime_formatstring()

get_datetime_formatstring($type = 'datetime'

Parameters

$type

Retrieve translated version of meridiem string.

get_meridiem(string $meridiem) : string

The $meridiem parameter is expected to not be translated.

access public

Parameters

$meridiem

string

Either 'am', 'pm', 'AM', or 'PM'. Not translated version.

Returns

stringTranslated version

Retrieve the full translated month by month number.

get_month(string|integer $month_number) : string

The $month_number parameter has to be a string because it must have the '0' in front of any number that is less than 10. Starts from '01' and ends at '12'.

You can use an integer instead and it will add the '0' before the numbers less than 10 for you.

access public

Parameters

$month_number

stringinteger

'01' through '12'

Returns

stringTranslated full month name

Retrieve translated version of month abbreviation string.

get_month_abbrev(string $month_name) : string

The $month_name parameter is expected to be the translated or translatable version of the month.

access public

Parameters

$month_name

string

Translated month to get abbreviated version

Returns

stringTranslated abbreviated month

get_month_initial()

get_month_initial($month_name) 

Parameters

$month_name

Retrieve the full translated weekday word.

get_weekday(integer $weekday_number) : string

Week starts on translated Sunday and can be fetched by using 0 (zero). So the week starts with 0 (zero) and ends on Saturday with is fetched by using 6 (six).

access public

Parameters

$weekday_number

integer

0 for Sunday through 6 Saturday

Returns

stringFull translated weekday

Retrieve the translated weekday abbreviation.

get_weekday_abbrev(string $weekday_name) : string

The weekday abbreviation is retrieved by the translated full weekday word.

access public

Parameters

$weekday_name

string

Full translated weekday word

Returns

stringTranslated weekday abbreviation

Retrieve the translated weekday initial.

get_weekday_initial(string $weekday_name) : string

The weekday initial is retrieved by the translated full weekday word. When translating the weekday initial pay attention to make sure that the starting letter does not conflict.

access public

Parameters

$weekday_name

string

Returns

string

Sets up the translated strings and object properties.

init() 

The method creates the translatable strings for various calendar elements. Which allows for specifying locale specific calendar names and text direction.

access private

Global variables are deprecated. For backwards compatibility only.

register_globals() 
deprecated For backwards compatibility only.
access private

 Properties

 

Stores date and time formatting strings.

$datetime_formatstring : array

Default

access public
 

Imports the global version to the class property.

$locale_vars : array

Default

array('text_direction')
access private
 

Stores the translated strings for 'am' and 'pm'.

$meridiem : array

Default

Also the capitalized versions.

access private
 

Stores the translated strings for the full month names.

$month : array

Default

access private
 

Stores the translated strings for the abbreviated month names.

$month_abbrev : array

Default

access private
 

Stores number formatting rules.

$number_format : array

Default

access public
 

The text direction of the locale language.

$text_direction : string

Default

''

Default is left to right 'ltr'.

access private
 

Stores the translated strings for the full weekday names.

$weekday : array

Default

access private
 

Stores the translated strings for the abbreviated weekday names.

$weekday_abbrev : array

Default

access private
 

Stores the translated strings for the one character weekday names.

$weekday_initial : array

Default

There is a hack to make sure that Tuesday and Thursday, as well as Sunday and Saturday don't conflict. See init() method for more.

see for how to handle the hack.
access private