devture/silex-localization-bundle

Silex bundle that helps with localization.

3.0.1 2021-12-07 07:07 UTC

This package is not auto-updated.

Last update: 2024-10-22 20:34:48 UTC


README

A Silex bundle that provides localization support.

It's like the Silex TranslationServiceProvider, but:

  • loads translations from JSON files
  • extracts {locale} values from route paths
  • makes the standard $app['url_generator'] locale-aware: path()/url() calls maintain the {locale} value
  • activates the TranslationExtension from the Twig bridge
  • provides some additional Twig helper functions