haltuf / gender-helper
Latte Filter for gender detection and salutation.
Installs: 8 306
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.1
- haltuf/genderer: ~0.1
- nette/nette: ~2.3
Requires (Dev)
- nette/tester: ~1.3
This package is auto-updated.
Last update: 2024-12-20 19:44:10 UTC
README
Latte filter to detect
Requirements
- PHP 5.3.1 or higher
- Nette Framework, version 2.3 or higher
- Genderer
Installation
Easiest way to install is to add this line to your composer.json
file:
"require": {
"haltuf/gender-helper": "dev-master"
}
or
composer require haltuf/gender-helper:@dev
Then register the extension in your config.neon
file:
extensions:
genderHelper: Haltuf\GenderHelper\DI\Extension
Usage
You can use 2 new filters in your Latte templates:
{var $name = 'Tomáš Vomáčka'}
{$name|salute} Tomáši Vomáčko
{$name|gender} m
{$name|gender:'muž':'žena'} muž
Configuration
Optionally, you can change the name of the filters in the config.neon file:
genderHelper:
salutationFilter: 'oslov'
genderFilter: 'pohlavi'