2017 © Pedro PelĂĄez
 

symfony-bundle drupal-transliterator-bundle

Symfony bundle to use drupal transliteration (eg in doctrine sluggable extension).

image

khepin/drupal-transliterator-bundle

Symfony bundle to use drupal transliteration (eg in doctrine sluggable extension).

  • Sunday, January 6, 2013
  • by Khepin
  • Repository
  • 1 Watchers
  • 3 Stars
  • 11,360 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

This bundle provides a better transliterator than the one included in Doctrine Extensions. This is useful for the Sluggable behavior if you are using a non alphabetic based language. The one bundled in Doctrine extensions works fine for many languages but I found limitations with Chinese at least. Drupal provides a more advanced one., (*1)

Transliteration is the process of changing text from 挗äșŹ to Bei Jing. So that it can be url formatted afterwards., (*2)

Installation

Through the deps files add:, (*3)

[KhepinDrupalTransliteratorBundle]
    git=https://github.com/khepin/KhepinDrupalTransliteratorBundle.git
    target=/bundles/Khepin/DrupalTransliteratorBundle

Run your vendor script ./bin/vendors install., (*4)

In your autoload.php register the Khepin namespace:, (*5)

$loader->registerNamespaces(array(
    // ...
    'Khepin'           => __DIR__.'/../vendor/bundles',
    // ...
));

There is no real need to register the bundle as all it provides is a class with static methods to transliterate strings. Having it autoloaded is enough., (*6)

Usage

The bundle provides a Transliterator class with two methods: - One to just transliterate the text: Khepin\DrupalTransliteratorBundle\Transliterator::transliterate - One that is compatible directly with the declaration in doctrine extensions Khepin\DrupalTransliteratorBundle\Transliterator::sluggableTransliterate, (*7)

The bundle also overrides the standard Doctrine Extensions Sluggable listener so that it uses this transliteration method rather than the standard one. In order to use it, change your DoctrineExtensionBundle to use the new listener:, (*8)

stof_doctrine_extensions:
    class:
        sluggable: Khepin\DrupalTransliteratorBundle\Listener\SluggableListener
    mongodb:
        default: 
            sluggable: true
    # or
    orm:
        default:
            sluggable: true

The Versions

06/01 2013

dev-master

9999999-dev https://github.com/khepin/KhepinDrupalTransliteratorBundle

Symfony bundle to use drupal transliteration (eg in doctrine sluggable extension).

  Sources   Download

GPLv2

by SĂ©bastien Armand

slug transliteration

06/01 2013

v1.0.2

1.0.2.0 https://github.com/khepin/KhepinDrupalTransliteratorBundle

Symfony bundle to use drupal transliteration (eg in doctrine sluggable extension).

  Sources   Download

GPLv2

by SĂ©bastien Armand

slug transliteration

06/01 2013

v1.0.1

1.0.1.0 https://github.com/khepin/KhepinDrupalTransliteratorBundle

Symfony bundle to use drupal transliteration (eg in doctrine sluggable extension).

  Sources   Download

GPLv2

by SĂ©bastien Armand

slug transliteration

14/04 2012

v1.0.0

1.0.0.0 https://github.com/khepin/KhepinDrupalTransliteratorBundle

Symfony bundle to use drupal transliteration (eg in doctrine sluggable extension).

  Sources   Download

GPLv2

by SĂ©bastien Armand

slug transliteration