You can set the culture for at the beginning of your invoice template,  
and reset it at the end

// header
// save existing culture
<?php $culture = $sf_user->getCulture(); ?>
<?php $sf_user->setCulture($request->getParameter("lang"); ?>
// do stuff
// reset original culture
<?php $sf_user->setCulture($culture); ?>
// footer

On 18 Mar 2009, at 21:35, Tomasz Ignatiuk wrote:

>
> @dsb - but this works to load default language to stuff that isn't
> translated if I got it right. But for me it won't work
>
> @Lee, but how to use in some part of my templates users culture, and
> in other parts culture by parameter? If I use this <?php $sf_user-
>> setCulture('en_US') ?> it will set culture to user, which is to whole
> application.
>
> To be more specific. My application is in polish as default. I can
> also switch to english.
>
> My invoice module by default prints documents in polish (user culture
> set to polish). But I want to also have an option to print invoice in
> english, german, french, spanish etc. So that I need translations only
> for words used in invoices. Now I want to have a choice list where I
> choose language for print, reload page (all stays in polish - menu,
> header etc, but invoice text change to different language). I hit Ctrl
> +p and it is done....how to make it work?
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to