skounis/blellow_helper

There is no license information available for the latest version (dev-master) of this package.

Additional functionality required by the Blellow Theme for Futurium D8 website

Installs: 1 460

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 1

Type:drupal-module

dev-master 2020-06-18 09:54 UTC

This package is auto-updated.

Last update: 2024-05-18 20:08:47 UTC


README

This module offers some additional functionality that might come in useful for the Blellow theme.

Here is an overview of the features it offers:

Additional Twig filters

Work in progress

format_size

The format_size filter gives an easy way to display file sizes in human readable format.

Example

If the variable {{ filesize }} contains the number 123456:

{{ filesize|format_size }}

Output: 120.56 KB.

to_language

The to_language filter will convert a language code into the full language name in the current language. Please note that for this to work the language should be enabled, and be translated in the current language.

This filter works great in conjunction with the OpenEuropa Multilingual module which includes all translations of the European language names.

Example

If the variable {{ langcode }} contains es and the current language is English:

{{ langcode|to_language }}

Output: Spanish.

to_native_language

The to_native_language filter will convert a language code into the full language name in the native language. Please note that for this to work the language should be enabled, and be translated in the its own native language.

This filter works great in conjunction with the OpenEuropa Multilingual module which includes all native translations of the European language names.

Example

If the variable {{ langcode }} contains es:

{{ langcode|to_nativelanguage }}

Output: Español.