2017 © Pedro PelĂĄez
 

symfony-bundle nodiacritic-bundle

The symfony integration for nodiacritic library

image

vria/nodiacritic-bundle

The symfony integration for nodiacritic library

  • Sunday, September 18, 2016
  • by riabchenkovlad
  • Repository
  • 1 Watchers
  • 0 Stars
  • 944 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

VRiaNoDiacriticBundle

Build Status, (*1)

The symfony integration for nodiacritic library - tiny library that removes all diacritical signs from characters., (*2)

Installation

Using Composer, run:, (*3)

composer require vria/nodiacritic-bundle

Add the VRiaNoDiacriticBundle to your application kernel:, (*4)

// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new VRia\Bundle\NoDiacriticBundle\VRiaNoDiacriticBundle(),
        // ...
    );
}

Use

In controller:, (*5)

$noDiacriticString = NoDiacritic::filter("Révolution française");

In Twig template:, (*6)

{{ "Révolution française"|nodiacritic }}

As expected, the result is Revolution francaise., (*7)

As you can see nodiacritic library is aware of German and Danish particularities, and so is this integration. The bunble reads current locale from Request and pass it to filter function. In case the desired locale is different you can pass it as a parameter:, (*8)

Ceci est une phrase allemande sans caractĂšres spĂ©ciaux: {{ "Schöne straße"|nodiacritic("de") }}

will print Ceci est une phrase allemande sans caractÚres spéciaux: Schoene strasse., (*9)

You can find the article about the library in my blog., (*10)

The Versions

18/09 2016

dev-master

9999999-dev

The symfony integration for nodiacritic library

  Sources   Download

MIT

The Requires

 

The Development Requires

filter symfony string accent diacritic

18/09 2016

0.0.5

0.0.5.0

The symfony integration for nodiacritic library

  Sources   Download

MIT

The Requires

 

The Development Requires

filter symfony string accent diacritic