I18N ​
- Type
- Class
- Namespace
- craft\web\twig\variables
- Inherits
- craft\web\twig\variables\I18N
- Since
- 3.0.0
- Deprecated in
- in 3.0.0
Localization functions.
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() ​
Gets all known languages.
Returns ​
getAppLocales() ​
Returns the locales that the application is translated for.
Returns ​
getCurrentLocale() ​
Returns the current locale.
Returns ​
getDatepickerJsFormat() ​
Returns the jQuery UI Datepicker date format, per the current locale.
Returns ​
getEditableLocaleIds() ​
Returns an array of the editable locale IDs.
Returns ​
getEditableLocales() ​
Returns a list of locales that are editable by the current user.
Returns ​
getLocaleById() ​
Returns a locale by its ID.
Arguments ​
$localeId(string)
Returns ​
getLocaleData() ​
Returns the localization data for a given locale.
Arguments ​
Returns ​
getPrimarySiteLocale() ​
Returns the site's primary locale.
Returns ​
getSiteLocaleIds() ​
Returns an array of the site locale IDs.
Returns ​
getSiteLocales() ​
Returns the locales that the site is translated for.
Returns ​
getTimepickerJsFormat() ​
Returns the jQuery Timepicker time format, per the current locale.