Gets the central locale-string.

This string shall be used as primary and fallback setting for translations and localized renderings such as numbers, dates, etc..


Syntax

getLocale(): ?string

Returns the complete locale string, e.g. "de_DE".

Example

Getting the locale-string, currently set for the rendering.

{% set myLoc = hublify.getLocale() %}