Sets the central language-string (ISO-Code).

This setting is propagated into the locale-string-setting, internally and into the render ENV.


Syntax

setLanguage(?string $lang): bool

  • $lang - string|null
    A language ISO-code string, e.g. "DE".
    NULL unsets the locale-string and indirectly disables probably some fallback translations/localization renderings in dependent components.


Example

Setting the language for further rendering.

{% do hublify.setLanguage('DE') %}