Skip to content

streamlinesocial/LocalizationBundle

Repository files navigation

Modify the following files on your Symfony project to enable this bundle:

  1. in app/AppKernel.php
class AppKernel extends Kernel
{
	public function registerBundles(){
		$bundles = array(
			new StrSocial\Bundle\LocalizationBundle\StrSocialLocalizationBundle(),
		);
	}
}
  1. app/config/routing.yml
	str_social_localization_bundle:
		resource: "@StrSocialLocalizationBundle/Controller/"
		type:     annotation
		prefix:   /
  1. add l10n js scripts to your twig
{% javascripts
    '@StrSocialLocalizationBundle/Resources/public/js/vendor/*'
    '@StrSocialLocalizationBundle/Resources/public/js/*'
%}
    <script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
  1. to easily activate the feature from the frontend, add this to your js script
$(document).ready(function(){
	StrSocialL10n.fn.postTimeZoneAndReloadPageIfNeeded();
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published