forked from a64f7bb4-7358-4778-9fbe-3b882c34cc1d/v1
![]() |
||
---|---|---|
.. | ||
config/schema | ||
css | ||
js | ||
src/Plugin/Field/FieldFormatter | ||
tests/src/Functional | ||
LICENSE.txt | ||
README.md | ||
composer.json | ||
field_timer.info.yml | ||
field_timer.libraries.yml |
README.md
Field Timer
Description
This module provides datetime field formatters to display the field as a timer or countdown. Module provides 3 field formatters: simple text and 2 formatters based on jQuery plugins: County and jQuery Countdown.
Requirements
Installation
- Download the module.
- Download required JS libraries to drupal library directory and rename library directories to libraries/county and libraries/jquery.countdown respectively. This module supports jQuery Countdown 2.1.0.
- Enable the module using admin module page or drush.
Translation
Translation of 'Text timer or countdown' formatter can be done on the User interface translation page. Translation of jQuery Countdown is not compatible with Drupal translation system. Therefore a special compatibility layer was created in the module. Translation of 'jQuery Countdown' formatter can be done by 2 ways:
- In the formatter settings form check option 'Use system language'. In this case it will use the first langcode from the list - current content language, default language, 'en', which will be found in jQuery Countdown translation sets. For example, if content language is Belarusian (by), default language is Russian (ru), then countdown will be displayed in Russian because there is no Belarusian for jQuery Countdown.
- You may specify Language option for each language enabled in the system separately. In order to do it uncheck option 'Use system language' in the formatter settings form, export configs with 'drush cex'. After that you need find appropriate entity_view_mode entity config file in the folder with exported configurations, copy the file to the language folder which you want translate to and change in the copied file option 'regional' for your field. Formatter settings cannot be translated via interface yet. See https://www.drupal.org/project/drupal/issues/2546212
Issues, Bugs and Feature Requests
Issues, Bugs and Feature Requests should be made on the page at https://drupal.org/project/issues/2040519.
Creators
This module was created by Sergei Brill