-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The chain route in 1.8 (trunk and PR) allows this pretty easily, take a
look at the documention (trunk, not compiled so far).
...................................
:  ___   _   ___ ___ ___ _ ___    :
: |   \ /_\ / __| _ \ _ (_)   \   :
: | |) / _ \\__ \  _/   / | |) |  :
: |___/_/:\_\___/_| |_|_\_|___/   :
:........:........................:
: Web    : http://www.dasprids.de :
: E-mail : m...@dasprids.de       :
: Jabber : jab...@dasprids.de     :
: ICQ    : 105677955              :
:........:........................:


J DeBord schrieb:
> When using Zend_Translate, what is the best way to get the user's
> language preference?
> 
> I have made a custom route '/:language/:controller/:action' and like the
> look of the url this creates.
> 
> Then in my base controller, I get the language param and make sure it is
> one of the languages I have translated, then I get the translate object
> from the registry and set it's locale based on this. This seems to work,
> but I'm not convinced it is the best way.
> 
> Also is is possible to use the default route all the time, except when a
> language other than english has been choosen?
> 
> For example, the default route always displays english unless
> example.com/fr/ <http://example.com/fr/> is typed in or linked, then the
> language route kicks in?
> 
> Thanks.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAknssYoACgkQ0HfT5Ws789BW/ACgzcsDhbY1K7VDzsNWfR8aVO+t
XTgAmIcEnlCqlywdpfHeoaI1z2QrsnQ=
=t96x
-----END PGP SIGNATURE-----

Reply via email to