View helpers

Following is the list of helper properties and methods shared with the templates.


An instance of i18n for the default locale is shared with the templates as a global property.

However, the DetectUserLocale middleware overrides this property and shares a request specific instance for the current user's locale.

{{ i18n.locale }}
{{ i18n.formatNumber(100) }}


The t helper is an alias for the i18n.formatMessage method.

{{ t('messages.title') }}


Returns the default locale for the application.

{{ getDefaultLocale() }}


Returns an array of the supported locales.

{{ getSupportedLocales() }}