Class craft\web\twig\variables\I18N
- Inheritance
- craft\web\twig\variables\I18N
- Available since version
- 3.0
- Deprecated since version
- in 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/web/twig/variables/I18N.php
Localization functions.
Method | Description | Defined By |
---|---|---|
getAllLocales() |
Gets all known languages. | craft\web\twig\variables\I18N |
getAppLocales() |
Returns the locales that the application is translated for. | craft\web\twig\variables\I18N |
getCurrentLocale() |
Returns the current locale. | craft\web\twig\variables\I18N |
getDatepickerJsFormat() |
Returns the jQuery UI Datepicker date format, per the current locale. | craft\web\twig\variables\I18N |
getEditableLocaleIds() |
Returns an array of the editable locale IDs. | craft\web\twig\variables\I18N |
getEditableLocales() |
Returns a list of locales that are editable by the current user. | craft\web\twig\variables\I18N |
getLocaleById() |
Returns a locale by its ID. | craft\web\twig\variables\I18N |
getLocaleData() |
Returns the localization data for a given locale. | craft\web\twig\variables\I18N |
getPrimarySiteLocale() |
Returns the site's primary locale. | craft\web\twig\variables\I18N |
getSiteLocaleIds() |
Returns an array of the site locale IDs. | craft\web\twig\variables\I18N |
getSiteLocales() |
Returns the locales that the site is translated for. | craft\web\twig\variables\I18N |
getTimepickerJsFormat() |
Returns the jQuery Timepicker time format, per the current locale. | craft\web\twig\variables\I18N |
Method Details
getAllLocales()
public method
#
Gets all known languages.
public craft\i18n\Locale[] getAllLocales ( )
getAppLocales()
public method
#
Returns the locales that the application is translated for.
public craft\i18n\Locale[] getAppLocales ( )
getCurrentLocale()
public method
#
Returns the current locale.
public craft\i18n\Locale getCurrentLocale ( )
getDatepickerJsFormat()
public method
#
Returns the jQuery UI Datepicker date format, per the current locale.
public string getDatepickerJsFormat ( )
getEditableLocaleIds()
public method
#
Returns an array of the editable locale IDs.
public array getEditableLocaleIds ( )
getEditableLocales()
public method
#
Returns a list of locales that are editable by the current user.
public craft\i18n\Locale[] getEditableLocales ( )
getLocaleById()
public method
#
Returns a locale by its ID.
public craft\i18n\Locale getLocaleById ( \craft\web\twig\variables\string $localeId )
$localeId |
string |
getLocaleData()
public method
#
Returns the localization data for a given locale.
public craft\i18n\Locale getLocaleData ( \craft\web\twig\variables\string $localeId = null )
$localeId |
string, null |
getPrimarySiteLocale()
public method
#
Returns the site's primary locale.
public string getPrimarySiteLocale ( )
getSiteLocaleIds()
public method
#
Returns an array of the site locale IDs.
public array getSiteLocaleIds ( )
getSiteLocales()
public method
#
Returns the locales that the site is translated for.
public craft\i18n\Locale[] getSiteLocales ( )
getTimepickerJsFormat()
public method
#
Returns the jQuery Timepicker time format, per the current locale.
public string getTimepickerJsFormat ( )