LocalizationVariable
- Type
- Class
- Namespace
- Craft
- Inherits
- Craft\LocalizationVariable
- Since
- 1.0
Localization functions.
See also http://craftcms.com
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getAllLocales() | Gets all known languages. |
getAppLocales() | Returns the locales that the application is translated for. |
getCurrentLocale() | Returns the current locale. |
getDatepickerJsFormat() | Returns the jQuery UI Datepicker date format, per the current locale. |
getEditableLocaleIds() | Returns an array of the editable locale IDs. |
getEditableLocales() | Returns a list of locales that are editable by the current user. |
getLocaleById() | Returns a locale by its ID. |
getLocaleData() | Returns the localization data for a given locale. |
getPrimarySiteLocale() | Returns the site's primary locale. |
getSiteLocaleIds() | Returns an array of the site locale IDs. |
getSiteLocales() | Returns the locales that the site is translated for. |
getTimepickerJsFormat() | Returns the jQuery Timepicker time format, per the current locale. |
# getAllLocales()
Signature
public array getAllLocales ( )
# getAppLocales()
Signature
public array getAppLocales ( )
# getCurrentLocale()
Signature
public Craft\LocaleModel getCurrentLocale ( )
# getDatepickerJsFormat()
Returns the jQuery UI Datepicker date format, per the current locale.
View source (opens new window)
Returns
Signature
public string getDatepickerJsFormat ( )
# getEditableLocaleIds()
Signature
public array getEditableLocaleIds ( )
# getEditableLocales()
Returns a list of locales that are editable by the current user.
View source (opens new window)
Returns
Signature
public array getEditableLocales ( )
# getLocaleById()
Returns a locale by its ID.
View source (opens new window)
Arguments
$localeId
(string (opens new window))
Returns
Signature
public Craft\LocaleModel getLocaleById ( $localeId )
# getLocaleData()
Returns the localization data for a given locale.
View source (opens new window)
Arguments
$localeId
(string (opens new window), null (opens new window))
Returns
Signature
public Craft\LocaleData, null getLocaleData ( $localeId = null )
# getPrimarySiteLocale()
Signature
public string getPrimarySiteLocale ( )
# getSiteLocaleIds()
Signature
public array getSiteLocaleIds ( )
# getSiteLocales()
Signature
public array getSiteLocales ( )
# getTimepickerJsFormat()
Returns the jQuery Timepicker time format, per the current locale.
View source (opens new window)
Returns
Signature
public string getTimepickerJsFormat ( )