Hi!

I don't think either of these things is possible, but someone will surely
correct me if I'm wrong. I can see *why* you'd want this feature, but since
it's not really necessary - and we all tend to favor being explicit - I
don't think it exists.

You should, however, be able to set the domain to a variable in your
controller (passed to your template), and use it:

{% trans 'Translate this' from theDomain %}

Good luck!

Ryan Weaver
US Office Head & Trainer - KnpLabs - Nashville, TN
http://www.knplabs.com <http://www.knplabs.com/en>
http://www.thatsquality.com
Twitter: @weaverryan


On Tue, Apr 5, 2011 at 9:04 AM, Ruudk <[email protected]> wrote:

> Hi,
>
> Is it possible to set the default translation domain inside a controller so
> that the templates will use this?
>
> Now I have to type this {% trans 'Translate this' from 'mycustomdomain' %}
> but I would like to have (% trans 'Translate this' %)
>
> Is it also possible to restrict the domain of the trans helper to only one
> domain?
>
> Thanks!
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to