Help to set cookie with nginx

Hi all,
I have recently been trying to convert the following rule from Apache to
Nginx without any success:
RewriteRule ^/id=([0-9])(&lаng=((de)|(es)|(fr)))?$ -
[CO=id:$1:.domain.com:525600:/]

Have anybody tried anything like that before? I am completely lost and
without that rule can’t move to work with nginx …

Thanks,
Alex

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,104630,104630#msg-104630