Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update routing to expose bazinga_jstranslation_js route #149

Merged
merged 1 commit into from
Oct 27, 2015

Conversation

delphiki
Copy link
Contributor

@delphiki delphiki commented Sep 9, 2015

This allows the bundle to be used in combination with the FOSJsRoutingBundle, and load a specific translation file via javascript / jQuery, "on demand".

Usage example:

// with jquery
$.getScript(Routing.generate('bazinga_jstranslation_js', {'domain': 'my-custom-domain'}), function(){
    alert(Translator.trans('say.hello', {}, 'my-custom-domain'));
});

I'm not sure if this has any side effect I'm not aware of, but this works pretty well.

This allows the bundle to be used in combination with the FOSJsRoutingBundle, and load translation via javascript / jQuery.
@delphiki delphiki changed the title Update routing to expose bazinga_jstranslation_js Update routing to expose bazinga_jstranslation_js route Sep 9, 2015
willdurand added a commit that referenced this pull request Oct 27, 2015
Update routing to expose bazinga_jstranslation_js route
@willdurand willdurand merged commit 5ba1690 into willdurand:master Oct 27, 2015
@willdurand
Copy link
Owner

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants